home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / phigs / ptk.lha / ptk / source / library / pinqfns.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-01  |  106.7 KB  |  3,542 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*-------------------- phinter inquire functions ---------------------------*/
  3. /*--------------------------------------------------------------------------*/
  4.  
  5. static void do_pinq_all_conf_structs()
  6. {
  7.   Pint arid, i, start, err, totlength, def;
  8.   Pint_list ids;
  9.  
  10. #ifdef HP
  11.   phintererror(1, (char *)NULL, INFORM);
  12. #else
  13.   arid = readinteger("archive identifier ? ");
  14.   start = readposinteger("starting position ? ");
  15.   pinq_all_conf_structs(arid, 0, start, &err, &ids, &totlength);
  16.   ids.ints = (Pint *)calloc(totlength, sizeof(Pint));
  17.   ids.num_ints = totlength;
  18.   pinq_all_conf_structs(arid, totlength, start, &err, &ids, &totlength);
  19.   if (writeinform)
  20.   {
  21.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  22.     if (err == 0)
  23.     {
  24.       phinprintf(PTKEINFORM, "conflicting structures:\n");
  25.       phinprintf(PTKEINFORM, "number = ");
  26.       writeintlst(PTKEINFORM, &ids, PTKESTRUCTID);
  27.     }
  28.     else
  29.       phigserror(PTKEINFORM, err);
  30.   }
  31.   free(ids.ints);
  32. #endif
  33. }  /* do_pinq_all_conf_structs */
  34.  
  35. /*--------------------------------------------------------------------------*/
  36.  
  37. static void do_pinq_anno_facs()
  38. {
  39.   Pint wstype, start, err, totlength, i, numcharhts;
  40.   Pint_list styles;
  41.   Pfloat mincharht, maxcharht;
  42.  
  43.   readwstype(&wstype);
  44.   start = readposinteger("starting position ? ");
  45.   pinq_anno_facs(wstype, 0, start, &err, &styles, &totlength, &numcharhts,
  46.                  &mincharht, &maxcharht);
  47.   styles.ints = (Pint *)calloc(totlength, sizeof(Pint));
  48.   pinq_anno_facs(wstype, totlength, start, &err, &styles, &totlength,
  49.                  &numcharhts, &mincharht, &maxcharht);
  50.   if (writeinform)
  51.   {
  52.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  53.     if (err == 0)
  54.     {
  55.       phinprintf(PTKEINFORM, "annotation styles:\n");
  56.       phinprintf(PTKEINFORM, "number = ");
  57.       writeintlst(PTKEINFORM, &styles, PTKENOTABLE);
  58.       phinprintf(PTKEINFORM, "number of character heights = %d\n", 
  59.                  numcharhts);
  60.       phinprintf(PTKEINFORM, "minimum character height = %f\n", 
  61.                  mincharht);      
  62.       phinprintf(PTKEINFORM, "maximum character height = %f\n", 
  63.                  maxcharht);      
  64.     }
  65.     else
  66.       phigserror(PTKEINFORM, err);
  67.   }
  68.   free(styles.ints);
  69. }  /* do_pinq_anno_facs */
  70.  
  71. /*--------------------------------------------------------------------------*/
  72.  
  73. static void do_pinq_paths_ances()
  74. {
  75.   Pint stid, depth, err, i, j;
  76.   Ppath_order order;
  77.   Pelem_ref_list_list *paths;
  78.   Pstore store;
  79.  
  80.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  81.   order = readphigsenum(PTKEPATHORDER, "path order ? ");
  82.   depth = readposinteger("path depth ? ");
  83.   pcreate_store(&err, &store);
  84.   pinq_paths_ances(stid, order, depth, store, &err, &paths);
  85.   if (writeinform)
  86.   {
  87.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  88.     if (err == 0)
  89.     {
  90.       phinprintf(PTKEINFORM, "ancestor paths of structure %d:\n", stid);
  91.       for (i = 0; i < paths->num_elem_ref_lists; i++)
  92.       {
  93.         phinprintf(PTKEINFORM, "path %d:\n", i);
  94.         for (j = 0; j < paths->elem_ref_lists[i].num_elem_refs; j++)
  95.         {
  96.           phinprintf(PTKEINFORM, "structure %d\n", 
  97.                   paths->elem_ref_lists[i].elem_refs[j].struct_id);
  98.           phinprintf(PTKEINFORM, "element %d\n", 
  99.                   paths->elem_ref_lists[i].elem_refs[j].elem_pos);
  100.         }
  101.       }
  102.     }
  103.     else
  104.       phigserror(PTKEINFORM, err);
  105.   }
  106.   ptk_delstore(store);
  107. }  /* do_pinq_paths_ances */
  108.  
  109. /*--------------------------------------------------------------------------*/
  110.  
  111. static void do_pinq_ar_files()
  112. {
  113.   char *buffer;
  114.   Pint err, totsize, i, start;
  115.   Par_file_list *arfiles;
  116.   Pstore store;
  117.  
  118.   pinq_ar_files(store, &err, &arfiles);
  119.   if (writeinform)
  120.   {
  121.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  122.     if (err == 0)
  123.     {
  124.       for (i = 0; i < arfiles->num_ar_files; i++)
  125.         phinprintf(PTKEINFORM, 
  126.                 "open archive file [%d], identifier = %d, name = \"%s\"\n", 
  127.                 i, arfiles->ar_files[i].id, arfiles->ar_files[i].name);
  128.     }
  129.     else
  130.       phigserror(PTKEINFORM, err);
  131.   }
  132.   ptk_delstore(store);
  133. }  /* do_pinq_ar_files */
  134.  
  135. /*--------------------------------------------------------------------------*/
  136.  
  137. static void do_pinq_ar_st()
  138. {
  139.   Par_st archivestate;
  140.  
  141.   pinq_ar_st(&archivestate);
  142.   if (writeinform)
  143.   {
  144.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  145.     phinprintf(PTKEINFORM, "archive state value = ");
  146.     writephigsenum(PTKEINFORM, PTKEARCHIVESTATE, archivestate);
  147.   }
  148. }  /* do_pinq_ar_st */
  149.  
  150. /*--------------------------------------------------------------------------*/
  151.  
  152. static void do_pinq_choice_st()
  153. {
  154.   Pint ws, dev, err, initchoice, pet;
  155.   Pstore store;
  156.   Pin_status status;
  157.   Pecho_switch esw;
  158.   Pop_mode mode;
  159.   Plimit echo;
  160.   Pchoice_data *choicedata;
  161.  
  162.   ws = readinteger("workstation identifier ? ");
  163.   dev = readinteger("choice device number ? ");
  164.   pcreate_store(&err, &store);
  165.   pinq_choice_st(ws, dev, store, &err, &mode, &esw, &status, &initchoice,
  166.                  &pet, &echo, &choicedata);
  167.   if (writeinform)
  168.   {
  169.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  170.     if (err == 0)
  171.     {
  172.       phinprintf(PTKEINFORM, "current state of choice device %d:\n", dev);
  173.       phinprintf(PTKEINFORM, "operating mode = ");
  174.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  175.       phinprintf(PTKEINFORM, "echo switch = ");
  176.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  177.       phinprintf(PTKEINFORM, "initial status = ");
  178.       writephigsenum(PTKEINFORM, PTKEISTATUS, status);  
  179.       phinprintf(PTKEINFORM, "initial choice = ");
  180.       writeinteger(PTKEINFORM, initchoice);
  181.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  182.       writeinteger(PTKEINFORM, pet);
  183.       phinprintf(PTKEINFORM, "echo limits:\n");
  184.       writelimit(PTKEINFORM, &echo);
  185.       writechoicerec(PTKEINFORM, dev, pet, choicedata);
  186.     }
  187.     else
  188.       phigserror(PTKEINFORM, err);
  189.   }
  190.   ptk_delstore(store);
  191. }  /* do_pinq_choice_st */
  192.  
  193. /*--------------------------------------------------------------------------*/
  194.  
  195. static void do_pinq_choice_st3()
  196. {
  197.   Pint ws, dev, err, initchoice, pet;
  198.   Pstore store;
  199.   Pin_status status;
  200.   Pecho_switch esw;
  201.   Pop_mode mode;
  202.   Plimit3 echo;
  203.   Pchoice_data3 *choicedata;
  204.  
  205.   ws = readinteger("workstation identifier ? ");
  206.   dev = readinteger("choice device number ? ");
  207.   pcreate_store(&err, &store);
  208.   pinq_choice_st(ws, dev, store, &err, &mode, &esw, &status, &initchoice,
  209.                  &pet, &echo, &choicedata);
  210.   if (writeinform)
  211.   {
  212.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  213.     if (err == 0)
  214.     {
  215.       phinprintf(PTKEINFORM, "current state of choice device %d:\n", dev);
  216.       phinprintf(PTKEINFORM, "operating mode = ");
  217.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  218.       phinprintf(PTKEINFORM, "echo switch = ");
  219.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  220.       phinprintf(PTKEINFORM, "initial status = ");
  221.       writephigsenum(PTKEINFORM, PTKEISTATUS, status);  
  222.       phinprintf(PTKEINFORM, "initial choice = ");
  223.       writeinteger(PTKEINFORM, initchoice);
  224.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  225.       writeinteger(PTKEINFORM, pet);
  226.       phinprintf(PTKEINFORM, "echo limits:\n");
  227.       writelimit3(PTKEINFORM, &echo);
  228.       writechoicerec3(PTKEINFORM, dev, pet, choicedata);
  229.     }
  230.     else
  231.       phigserror(PTKEINFORM, err);
  232.   }
  233.   ptk_delstore(store);
  234. }  /* do_pinq_choice_st3 */
  235.  
  236. /*--------------------------------------------------------------------------*/
  237.  
  238. static void do_pinq_colr_facs()
  239. {
  240.   Pint wstype;
  241.   Pint err, i;
  242.   Pcolr_facs facil;
  243.  
  244.   readwstype(&wstype);
  245.   pinq_colr_facs(wstype, &err, &facil);
  246.   if (writeinform)
  247.   {
  248.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  249.     if (err == 0)
  250.     {
  251.       phinprintf(PTKEINFORM, "colour facilities:\n");
  252.       phinprintf(PTKEINFORM, "number of colours = ");
  253.       writeinteger(PTKEINFORM, facil.num_colrs);
  254.       phinprintf(PTKEINFORM, "colour availability = ");
  255.       writephigsenum(PTKEINFORM, PTKECOAVAIL, facil.colr_avail);
  256.       phinprintf(PTKEINFORM, "number of predefined colour bundles = ");
  257.       writeinteger(PTKEINFORM, facil.num_pred_inds);
  258.       phinprintf(PTKEINFORM, "chromaticity coefficients:\n");
  259.       for (i = 0; i < 3; i++)
  260.       {
  261.         phinprintf(PTKEINFORM, "primary colour [%d]:\n", i);
  262.         phinprintf(PTKEINFORM, "x coefficient = %f\n",
  263.                    facil.prim_colrs[i].cieluv_x);
  264.         phinprintf(PTKEINFORM, "y coefficient = %f\n", 
  265.                    facil.prim_colrs[i].cieluv_y);
  266.         phinprintf(PTKEINFORM, "y luminance = %f\n", 
  267.                    facil.prim_colrs[i].cieluv_y_lum);
  268.       }
  269.     }
  270.     else
  271.       phigserror(PTKEINFORM, err);
  272.   }
  273. }  /* do_pinq_colr_facs */
  274.  
  275. /*--------------------------------------------------------------------------*/
  276.  
  277. static void do_pinq_colr_model()
  278. {
  279.   Pint ws, err, model;
  280.  
  281.   ws = readinteger("workstation identifier ? ");
  282.   pinq_colr_model(ws, &err, &model);
  283.   if (writeinform)
  284.   {
  285.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  286.     if (err == 0)
  287.     {
  288.       phinprintf(PTKEINFORM, "colour model = ");
  289.       writeinteger(PTKEINFORM, model);
  290.     }
  291.     else
  292.       phigserror(PTKEINFORM, err);
  293.   }
  294. }  /* do_pinq_colr_model */
  295.  
  296. /*--------------------------------------------------------------------------*/
  297.  
  298. static void do_pinq_colr_model_facs()
  299. {
  300.   Pint wstype;
  301.   Pint start, err, totlength, def, i;
  302.   Pint_list models;
  303.  
  304.   readwstype(&wstype);
  305.   start = readposinteger("starting position ? ");
  306.   pinq_colr_model_facs(wstype, 0, start, &err, &models, &totlength, &def);
  307.   models.ints = (Pint *)calloc(totlength, sizeof(Pint));
  308.   models.num_ints = totlength;
  309.   pinq_colr_model_facs(wstype, totlength, start, &err, &models, &totlength, 
  310.                        &def);
  311.   if (writeinform)
  312.   {
  313.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  314.     if (err == 0)
  315.     {
  316.       phinprintf(PTKEINFORM, "colour model facilities:\n");
  317.       phinprintf(PTKEINFORM, "colour models:\n");
  318.       phinprintf(PTKEINFORM, "number = ");
  319.       writeintlst(PTKEINFORM, models, PTKENOTABLE);
  320.       phinprintf(PTKEINFORM, "default colour model = ");
  321.       writeinteger(PTKEINFORM, def);
  322.     }
  323.     else
  324.       phigserror(PTKEINFORM, err);
  325.   }
  326.   free(models.ints);
  327. }  /* do_pinq_colr_model_facs */
  328.  
  329. /*--------------------------------------------------------------------------*/
  330.  
  331. static void do_pinq_colr_rep()
  332. {
  333.   Pint ws, index, err;
  334.   Pinq_type type;
  335.   Pcolr_rep rep;
  336.  
  337.   ws = readinteger("workstation identifier ? ");
  338.   index = readposintvalue("colour index ? ", PTKECOLOURIND);
  339.   type = readphigsenum(PTKEINQTYPE, "colour type ? ");
  340.   getcolourmodel(ws);
  341.   pinq_colr_rep(ws, index, type, &err, &rep);
  342.   if (writeinform)
  343.   {
  344.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  345.     if (err == 0)
  346.     {
  347.       phinprintf(PTKEINFORM, "colour representation:\n");
  348.       writecobundl(PTKEINFORM, &rep);
  349.     }
  350.     else
  351.       phigserror(PTKEINFORM, err);
  352.   }
  353. }  /* do_pinq_colr_rep */
  354.  
  355. /*--------------------------------------------------------------------------*/
  356.  
  357. static void do_pinq_conf_res()
  358. {
  359.   Pint err;
  360.   Pconf_res archive, retrieval;
  361.  
  362.   pinq_conf_res(&err, &archive, &retrieval);
  363.   if (writeinform)
  364.   {
  365.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  366.     if (err == 0)
  367.     {
  368.       phinprintf(PTKEINFORM, "archive resolution = ");
  369.       writephigsenum(PTKEINFORM, PTKECONFRES, archive);
  370.       phinprintf(PTKEINFORM, "retrieval resolution = ");
  371.       writephigsenum(PTKEINFORM, PTKECONFRES, retrieval);
  372.     }
  373.     else
  374.       phigserror(PTKEINFORM, err);
  375.   }
  376. }  /* do_pinq_conf_res */
  377.  
  378. /*--------------------------------------------------------------------------*/
  379.  
  380. static void do_pinq_conf_structs_net()
  381. {
  382.   Pint arid, stid, totlength, err, start;
  383.   Pstruct_net_source src;
  384.   Pint_list ids;
  385.  
  386. #ifdef HP
  387.   phintererror(1, (char *)NULL, INFORM);
  388. #else
  389.   arid = readinteger("archive identifier ? ");
  390.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  391.   src = readphigsenum(PTKESTRUCTNETSRC, "structure network source ? ");
  392.   start = readposinteger("starting position ? ");
  393.   pinq_conf_structs_net(arid, stid, src, 0, start, &err, &ids, &totlength);
  394.   ids.ints = (Pint *)calloc(totlength, sizeof(Pint));
  395.   ids.num_ints = totlength;
  396.   pinq_conf_structs_net(arid, stid, src, totlength, start, &err, &ids, 
  397.                       &totlength);
  398.   if (writeinform)
  399.   {
  400.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  401.     if (err == 0)
  402.     {
  403.       phinprintf(PTKEINFORM, "conflicting structures:\n");
  404.       phinprintf(PTKEINFORM, "number = ");
  405.       writeintlst(PTKEINFORM, &ids, PTKESTRUCTID);
  406.     }
  407.     else
  408.       phigserror(PTKEINFORM, err);
  409.   }
  410.   free(ids.ints);  
  411. #endif
  412. }  /* do_pinq_conf_structs_net */
  413.  
  414. /*--------------------------------------------------------------------------*/
  415.  
  416. static void do_pinq_cur_elem_content()
  417. {
  418.   Pstore store;
  419.   ptkselcontent elcont;
  420.   Pint err;
  421.  
  422.   pcreate_store(&err, &store);
  423.   ptk_inqcurelemtypesizecontent(store, &err, &elcont);
  424.   if (writeinform)
  425.   {
  426.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  427.     if (err == 0)
  428.     {
  429.       phinprintf(PTKEINFORM, "current element content:\n");
  430.       writeelemcontent(PTKEINFORM, &elcont);
  431.     }
  432.     else
  433.       phigserror(PTKEINFORM, err);
  434.   }
  435.   ptk_delstore(store);
  436. }  /* do_pinq_cur_elem_content */
  437.  
  438. /*--------------------------------------------------------------------------*/
  439.  
  440. static void do_pinq_cur_elem_type_size()
  441. {
  442.   Pint err;
  443.   Pelem_type eltype;
  444.   size_t size;
  445.  
  446.   pinq_cur_elem_type_size(&err, &eltype, &size);
  447.   if (writeinform)
  448.   {
  449.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  450.     if (err == 0)
  451.     {
  452.       phinprintf(PTKEINFORM, "current element type = ");
  453.       writephigsenum(PTKEINFORM, PTKEELTYPE, eltype);
  454.       phinprintf(PTKEINFORM, "current element size = ");
  455.       writeinteger(PTKEINFORM, size);
  456.     }
  457.     else
  458.       phigserror(PTKEINFORM, err);
  459.   }
  460. }  /* do_pinq_cur_elem_type_size */
  461.  
  462. /*--------------------------------------------------------------------------*/
  463.  
  464. static void do_pinq_def_choice_data()
  465. {
  466.   Pint wstype, dev, err, i, maxchoice;
  467.   Pstore store;
  468.   Pint_list *pets;
  469.   Plimit echo;
  470.   Pchoice_data *choicedata;
  471.  
  472.   readwstype(&wstype);
  473.   dev = readinteger("input device number ? ");
  474.   pcreate_store(&err, &store);
  475.   pinq_def_choice_data(wstype, dev, store, &err, &maxchoice, &pets,
  476.                        &echo, &choicedata);
  477.   if (writeinform)
  478.   {
  479.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  480.     if (err == 0)
  481.     {
  482.       phinprintf(PTKEINFORM, "default choice data:\n");
  483.       phinprintf(PTKEINFORM, "maximum number of choices = ");
  484.       writeinteger(PTKEINFORM, maxchoice);
  485.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  486.       phinprintf(PTKEINFORM, "number = ");
  487.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  488.       phinprintf(PTKEINFORM, "echo limits:\n");
  489.       writelimit(PTKEINFORM, &echo);
  490.       /* write pet 1 data record */
  491.       writechoicerec(PTKEINFORM, dev, 1, choicedata);
  492.     }
  493.     else
  494.       phigserror(PTKEINFORM, err);
  495.   }
  496.   ptk_delstore(store);
  497. }  /* do_pinq_def_choice_data */
  498.  
  499. /*--------------------------------------------------------------------------*/
  500.  
  501. static void do_pinq_def_choice_data3()
  502. {
  503.   Pint wstype, dev, err, totsize, i, maxchoice;
  504.   Pstore store;
  505.   Pint_list *pets;
  506.   Plimit3 echo;
  507.   Pchoice_data3 *choicedata;
  508.  
  509.   readwstype(&wstype);
  510.   dev = readinteger("input device number ? ");
  511.   pcreate_store(&err, &store);
  512.   pinq_def_choice_data3(wstype, dev, store, &err, &maxchoice, &pets, &echo,
  513.                         &choicedata);
  514.   if (writeinform)
  515.   {
  516.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  517.     if (err == 0)
  518.     {
  519.       phinprintf(PTKEINFORM, "default choice data 3:\n");
  520.       phinprintf(PTKEINFORM, "maximum number of choices = ");
  521.       writeinteger(PTKEINFORM, maxchoice);
  522.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  523.       phinprintf(PTKEINFORM, "number = ");
  524.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  525.       phinprintf(PTKEINFORM, "echo limits:\n");
  526.       writelimit3(PTKEINFORM, &echo);
  527.       /* write pet 1 data record */
  528.       writechoicerec3(PTKEINFORM, dev, 1, choicedata);
  529.     }
  530.     else
  531.       phigserror(PTKEINFORM, err);
  532.   }
  533.   ptk_delstore(store);
  534. }  /* do_pinq_def_choice_data3 */
  535.  
  536. /*--------------------------------------------------------------------------*/
  537.  
  538. static void do_pinq_def_disp_upd_st()
  539. {
  540.   Pint wstype, err;
  541.   Pdefer_mode defmode;
  542.   Pmod_mode modmode;
  543.  
  544.   readwstype(&wstype);
  545.   pinq_def_disp_upd_st(wstype, &err, &defmode, &modmode);
  546.   if (writeinform)
  547.   {
  548.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  549.     if (err == 0)
  550.     {
  551.       phinprintf(PTKEINFORM, "deferral mode = ");
  552.       writephigsenum(PTKEINFORM, PTKEDEFMODE, defmode);
  553.       phinprintf(PTKEINFORM, "modification mode = ");
  554.       writephigsenum(PTKEINFORM, PTKEMOD, modmode);
  555.     }
  556.     else
  557.       phigserror(PTKEINFORM, err);
  558.   }
  559. }  /* do_pinq_def_disp_upd_st */
  560.  
  561. /*--------------------------------------------------------------------------*/
  562.  
  563. static void do_pinq_def_loc_data()
  564. {
  565.   Pint wstype, dev, err, i;
  566.   Pstore store;
  567.   Ppoint pos;
  568.   Pint_list *pets;
  569.   Plimit echo;
  570.   Ploc_data locdata;
  571.  
  572.   readwstype(&wstype);
  573.   dev = readinteger("input device number ? ");
  574.   pcreate_store(&err, &store);
  575.   pinq_def_loc_data(wstype, dev, store, &err, &pos, &pets, &echo, &locdata);
  576.   if (writeinform)
  577.   {
  578.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  579.     if (err == 0)
  580.     {
  581.       phinprintf(PTKEINFORM, "default locator data:\n");
  582.       phinprintf(PTKEINFORM, "initial position:\n");
  583.       writepoint(PTKEINFORM, &pos);
  584.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  585.       phinprintf(PTKEINFORM, "number = ");
  586.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  587.       phinprintf(PTKEINFORM, "echo limits:\n");
  588.       writelimit(PTKEINFORM, &echo);
  589.       /* write pet 1 data record */
  590.       writelocrec(PTKEINFORM, dev, 1, locdata);
  591.     }
  592.     else
  593.       phigserror(PTKEINFORM, err);
  594.   }
  595.   ptk_delstore(store);
  596. }  /* do_pinq_def_loc_data */
  597.  
  598. /*--------------------------------------------------------------------------*/
  599.  
  600. static void do_pinq_def_loc_data3()
  601. {
  602.   Pint wstype, dev, err, totsize, i;
  603.   Pstore store;
  604.   Ppoint3 pos;
  605.   Pint_list *pets;
  606.   Plimit3 echo;
  607.   Ploc_data3 *locdata;
  608.  
  609.   readwstype(&wstype);
  610.   dev = readinteger("input device number ? ");
  611.   pcreate_store(&err, &store);
  612.   pinq_def_loc_data3(wstype, dev, store, &err, &pos, &pets, &echo, &locdata);
  613.   if (writeinform)
  614.   {
  615.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  616.     if (err == 0)
  617.     {
  618.       phinprintf(PTKEINFORM, "default locator data 3:\n");
  619.       phinprintf(PTKEINFORM, "initial position:\n");
  620.       writepoint3(PTKEINFORM, &pos);
  621.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  622.       phinprintf(PTKEINFORM, "number = ");
  623.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  624.       phinprintf(PTKEINFORM, "echo limits:\n");
  625.       writelimit3(PTKEINFORM, &echo);
  626.       /* write pet 1 data record */
  627.       writelocrec3(PTKEINFORM, dev, 1, locdata);
  628.     }
  629.     else
  630.       phigserror(PTKEINFORM, err);
  631.   }
  632.   ptk_delstore(store);
  633. }  /* do_pinq_def_loc_data3 */
  634.  
  635. /*--------------------------------------------------------------------------*/
  636.  
  637. static void do_pinq_def_pick_data()
  638. {
  639.   Pint wstype, dev, err, i;
  640.   Pstore store;
  641.   Plimit echo;
  642.   Pint_list *pets;
  643.   Ppick_data *pickdata;
  644.  
  645.   readwstype(&wstype);
  646.   dev = readinteger("input device number ? ");
  647.   pcreate_store(&err, &store);
  648.   pinq_def_pick_data(wstype, dev, store, &err, &pets, &echo, &pickdata);
  649.   if (writeinform)
  650.   {
  651.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  652.     if (err == 0)
  653.     {
  654.       phinprintf(PTKEINFORM, "default pick data:\n");
  655.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  656.       phinprintf(PTKEINFORM, "number = ");
  657.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  658.       phinprintf(PTKEINFORM, "echo limits:\n");
  659.       writelimit(PTKEINFORM, &echo);
  660.       /* write pet 1 data record */
  661.       writepickrec(PTKEINFORM, dev, 1, pickdata);
  662.     }
  663.     else
  664.       phigserror(PTKEINFORM, err);
  665.   }
  666.   ptk_delstore(store);
  667. }  /* do_pinq_def_pick_data */
  668.  
  669. /*--------------------------------------------------------------------------*/
  670.  
  671. static void do_pinq_def_pick_data3()
  672. {
  673.   Pint wstype, dev, err, totsize, i;
  674.   Pstore store;
  675.   Plimit3 echo;
  676.   Pint_list *pets;
  677.   Ppick_data3 *pickdata;
  678.   
  679.   readwstype(&wstype);
  680.   dev = readinteger("input device number ? ");
  681.   pcreate_store(&err, &store);
  682.   pinq_def_pick_data3(wstype, dev, store, &err, &pets, &echo, &pickdata);
  683.   if (writeinform)
  684.   {
  685.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  686.     if (err == 0)
  687.     {
  688.       phinprintf(PTKEINFORM, "default pick data 3:\n");
  689.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  690.       phinprintf(PTKEINFORM, "number = ");
  691.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  692.       phinprintf(PTKEINFORM, "echo limits:\n");
  693.       writelimit3(PTKEINFORM, &echo);
  694.       /* write pet 1 data record */
  695.       writepickrec3(PTKEINFORM, dev, 1, pickdata);
  696.     }
  697.     else
  698.       phigserror(PTKEINFORM, err);
  699.   }
  700.   ptk_delstore(store);
  701. }  /* do_pinq_def_pick_data3 */
  702.  
  703. /*--------------------------------------------------------------------------*/
  704.  
  705. static void do_pinq_def_string_data()
  706. {
  707.   Pint wstype, dev, err, i, maxbufsize;
  708.   Pstore store;
  709.   Pint_list *pets;
  710.   Plimit echo;
  711.   Pstring_data *stringdata;
  712.  
  713.   readwstype(&wstype);
  714.   dev = readinteger("input device number ? ");
  715.   pcreate_store(&err, &store);
  716.   pinq_def_string_data(wstype, dev, store, &err, &maxbufsize, &pets,
  717.                        &echo, &stringdata);
  718.   if (writeinform)
  719.   {
  720.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  721.     if (err == 0)
  722.     {
  723.       phinprintf(PTKEINFORM, "default string data:\n");
  724.       writeinteger(PTKEINFORM, err);
  725.       phinprintf(PTKEINFORM, "maximum buffer size = ");
  726.       writeinteger(PTKEINFORM, maxbufsize);
  727.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  728.       phinprintf(PTKEINFORM, "number = ");
  729.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  730.       phinprintf(PTKEINFORM, "echo limits:\n");
  731.       writelimit(PTKEINFORM, &echo);
  732.       /* write pet 1 data record */
  733.       writestringrec(PTKEINFORM, dev, 1, stringdata);
  734.     }
  735.     else
  736.       phigserror(PTKEINFORM, err);
  737.   }
  738.   ptk_delstore(store);
  739. }  /* do_pinq_def_string_data */
  740.  
  741. /*--------------------------------------------------------------------------*/
  742.  
  743. static void do_pinq_def_string_data3()
  744. {
  745.   Pint wstype, dev, err, i, maxbufsize;
  746.   Pstore store;
  747.   Pint_list *pets;
  748.   Plimit3 echo;
  749.   Pstring_data3 *stringdata;
  750.  
  751.   readwstype(&wstype);
  752.   dev = readinteger("input device number ? ");
  753.   pcreate_store(&err, &store);
  754.   pinq_def_string_data3(wstype, dev, store, &err, &maxbufsize, &pets,
  755.                         &echo, &stringdata);
  756.   if (writeinform)
  757.   {
  758.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  759.     if (err == 0)
  760.     {
  761.       phinprintf(PTKEINFORM, "default string data 3:\n");
  762.       phinprintf(PTKEINFORM, "maximum buffer size = ");
  763.       writeinteger(PTKEINFORM, maxbufsize);
  764.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  765.       phinprintf(PTKEINFORM, "number = ");
  766.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  767.       phinprintf(PTKEINFORM, "echo limits:\n");
  768.       writelimit3(PTKEINFORM, &echo);
  769.       /* write pet 1 data record */
  770.       writestringrec3(PTKEINFORM, dev, 1, stringdata);
  771.     }
  772.     else
  773.       phigserror(PTKEINFORM, err);
  774.   }
  775.   ptk_delstore(store);
  776. }  /* do_pinq_def_string_data3 */
  777.  
  778. /*--------------------------------------------------------------------------*/
  779.  
  780. static void do_pinq_def_stroke_data()
  781. {
  782.   Pint wstype, dev, err, i, maxbufsize;
  783.   Pstore store;
  784.   Pint_list *pets;
  785.   Plimit echo;
  786.   Pstroke_data *strokedata;
  787.  
  788.   readwstype(&wstype);
  789.   dev = readinteger("input device number ? ");
  790.   pcreate_store(&err, &store);
  791.   pinq_def_stroke_data(wstype, dev, store, &err, &maxbufsize, &pets, &echo,
  792.                        &strokedata);
  793.   if (writeinform)
  794.   {
  795.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  796.     if (err == 0)
  797.     {
  798.       phinprintf(PTKEINFORM, "default stroke data:\n");
  799.       phinprintf(PTKEINFORM, "maximum buffer size = ");
  800.       writeinteger(PTKEINFORM, maxbufsize);
  801.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  802.       phinprintf(PTKEINFORM, "number = ");
  803.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  804.       phinprintf(PTKEINFORM, "echo limits:\n");
  805.       writelimit(PTKEINFORM, &echo);
  806.       /* write pet 1 data record */
  807.       writestrokerec(PTKEINFORM, dev, 1, strokedata);
  808.     }
  809.     else
  810.       phigserror(PTKEINFORM, err);
  811.   }
  812.   ptk_delstore(store);
  813. }  /* do_pinq_def_stroke_data */
  814.  
  815. /*--------------------------------------------------------------------------*/
  816.  
  817. static void do_pinq_def_stroke_data3()
  818. {
  819.   Pint wstype, dev, err, i, maxbufsize;
  820.   Pstore store;
  821.   Pint_list *pets;
  822.   Plimit3 echo;
  823.   Pstroke_data3 *strokedata;  
  824.  
  825.   readwstype(&wstype);
  826.   dev = readinteger("input device number ? ");
  827.   pcreate_store(&err, &store);
  828.   pinq_def_stroke_data3(wstype, dev, store, &err, &maxbufsize, &pets, 
  829.                         &echo, &strokedata);
  830.   if (writeinform)
  831.   {
  832.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  833.     if (err == 0)
  834.     {
  835.       phinprintf(PTKEINFORM, "default stroke data 3:\n");
  836.       phinprintf(PTKEINFORM, "maximum buffer size = ");
  837.       writeinteger(PTKEINFORM, maxbufsize);
  838.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  839.       phinprintf(PTKEINFORM, "number = ");
  840.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  841.       phinprintf(PTKEINFORM, "echo limits:\n");
  842.       writelimit3(PTKEINFORM, &echo);
  843.       /* write pet 1 data record */
  844.       writestrokerec3(PTKEINFORM, dev, 1, strokedata);
  845.     }
  846.     else
  847.       phigserror(PTKEINFORM, err);
  848.   }
  849.   ptk_delstore(store);
  850. }  /* do_pinq_def_stroke_data3 */
  851.  
  852. /*--------------------------------------------------------------------------*/
  853.  
  854. static void do_pinq_def_val_data()
  855. {
  856.   Pint wstype, dev, err, i;
  857.   Pstore store;
  858.   Pfloat defval;
  859.   Pint_list *pets;
  860.   Plimit echo;
  861.   Pval_data *valdata;
  862.  
  863.   readwstype(&wstype);
  864.   dev = readinteger("input device number ? ");
  865.   pcreate_store(&err, &store);
  866.   pinq_def_val_data(wstype, dev, store, &err, &defval, &pets, &echo,
  867.                     &valdata);
  868.   if (writeinform)
  869.   {
  870.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  871.     if (err == 0)
  872.     {
  873.       phinprintf(PTKEINFORM, "default valuator data:\n");
  874.       phinprintf(PTKEINFORM, "initial value = ");
  875.       writereal(PTKEINFORM, defval);
  876.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  877.       phinprintf(PTKEINFORM, "number = ");
  878.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  879.       phinprintf(PTKEINFORM, "echo limits:\n");
  880.       writelimit(PTKEINFORM, &echo);
  881.       /* write pet 1 data record */
  882.       writevalrec(PTKEINFORM, dev, 1, valdata);
  883.     }
  884.     else
  885.       phigserror(PTKEINFORM, err);
  886.   }
  887.   ptk_delstore(store);
  888. }  /* do_pinq_def_val_data */
  889.  
  890. /*--------------------------------------------------------------------------*/
  891.  
  892. static void do_pinq_def_val_data3()
  893. {
  894.   Pint wstype, dev, err, i;
  895.   Pstore store;
  896.   Pfloat defval;
  897.   Pint_list *pets;
  898.   Plimit3 echo;
  899.   Pval_data3 *valdata;
  900.  
  901.   readwstype(&wstype);
  902.   dev = readinteger("input device number ? ");
  903.   pcreate_store(&err, &store);
  904.   pinq_def_val_data3(wstype, dev, store, &err, &defval, &pets, &echo,
  905.                      &valdata);
  906.   if (writeinform)
  907.   {
  908.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  909.     if (err == 0)
  910.     {
  911.       phinprintf(PTKEINFORM, "default valuator data 3:\n");
  912.       phinprintf(PTKEINFORM, "initial value = ");
  913.       writereal(PTKEINFORM, defval);
  914.       phinprintf(PTKEINFORM, "prompt/echo types:\n");
  915.       phinprintf(PTKEINFORM, "number = ");
  916.       writeintlst(PTKEINFORM, pets, PTKENOTABLE);
  917.       phinprintf(PTKEINFORM, "echo limits:\n");
  918.       writelimit3(PTKEINFORM, &echo);
  919.       /* write pet 1 data record */
  920.       writevalrec3(PTKEINFORM, dev, 1, valdata);
  921.     }
  922.     else
  923.       phigserror(PTKEINFORM, err);
  924.   }
  925.   ptk_delstore(store);
  926. }  /* do_pinq_def_val_data3 */
  927.  
  928. /*--------------------------------------------------------------------------*/
  929.  
  930. static void do_pinq_paths_descs()
  931. {
  932.   Pint stid, depth, err, i, j;
  933.   Ppath_order order;
  934.   Pstore store;
  935.   Pelem_ref_list_list *paths;
  936.  
  937.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  938.   order = readphigsenum(PTKEPATHORDER, "path order ? ");
  939.   depth = readposinteger("path depth ? ");
  940.   pcreate_store(&err, &store);
  941.   pinq_paths_descs(stid, order, depth, store, &err, &paths);
  942.   if (writeinform)
  943.   {
  944.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  945.     if (err == 0)
  946.     {
  947.       phinprintf(PTKEINFORM, "descendant paths of structure %d:\n",              stid);
  948.       for (i = 0; i < paths->num_elem_ref_lists; i++)
  949.       {
  950.         phinprintf(PTKEINFORM, "path %d:\n", i);
  951.         for (j = 0; j < paths->elem_ref_lists[i].num_elem_refs; j++)
  952.         {
  953.           phinprintf(PTKEINFORM, "structure identifier = ");
  954.           writeintvalue(PTKEINFORM, 
  955.                         paths->elem_ref_lists[i].elem_refs[j].struct_id,
  956.                         PTKESTRUCTID);
  957.           phinprintf(PTKEINFORM, "element number = ");
  958.           writeinteger(PTKEINFORM, 
  959.                        paths->elem_ref_lists[i].elem_refs[j].elem_pos);
  960.         }
  961.       }
  962.     }
  963.     else
  964.       phigserror(PTKEINFORM, err);
  965.   }
  966.   ptk_delstore(store);
  967. }  /* do_pinq_paths_descs */
  968.  
  969. /*--------------------------------------------------------------------------*/
  970.  
  971. static void do_pinqdisplayspacesize()
  972. {
  973.   Pint wstype;
  974.   Pint err;
  975.   Pdisp_space_size size;
  976.  
  977.   readwstype(&wstype);
  978.   pinq_disp_space_size(wstype, &err, &size);
  979.   if (writeinform)
  980.   {
  981.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  982.     if (err == 0)
  983.     {
  984.       phinprintf(PTKEINFORM, "display space size:\n");
  985.       phinprintf(PTKEINFORM, "device coordinate units = ");
  986.       writephigsenum(PTKEINFORM, PTKEDEVUNITS, size.dc_units);
  987.       phinprintf(PTKEINFORM, "device volume:\n");
  988.       writefloatsize(PTKEINFORM, &size.size_dc);
  989.       phinprintf(PTKEINFORM, "addressable units:\n");
  990.       writeintsize(PTKEINFORM, &size.size_raster);
  991.     }
  992.     else
  993.       phigserror(PTKEINFORM, err);
  994.   }
  995. }  /* do_pinqdisplayspacesize */
  996.  
  997. /*--------------------------------------------------------------------------*/
  998.  
  999. static void do_pinqdisplayspacesize3()
  1000. {
  1001.   Pint wstype;
  1002.   Pint err;
  1003.   Pdisp_space_size3 size;
  1004.  
  1005.   readwstype(&wstype);
  1006.   pinq_disp_space_size3(wstype, &err, &size);
  1007.   if (writeinform)
  1008.   {
  1009.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1010.     if (err == 0)
  1011.     {
  1012.       phinprintf(PTKEINFORM, "display space size:\n");
  1013.       phinprintf(PTKEINFORM, "device coordinate units = ");
  1014.       writephigsenum(PTKEINFORM, PTKEDEVUNITS, size.dc_units);
  1015.       phinprintf(PTKEINFORM, "device volume:\n");
  1016.       writefloatsize3(PTKEINFORM, &size.size_dc);
  1017.       phinprintf(PTKEINFORM, "addressable units:\n");
  1018.       writeintsize3(PTKEINFORM, &size.size_raster);
  1019.     }
  1020.     else
  1021.       phigserror(PTKEINFORM, err);
  1022.   }
  1023. }  /* do_pinqdisplayspacesize */
  1024.  
  1025. /*--------------------------------------------------------------------------*/
  1026.  
  1027. static void do_pinqdisplayupdatest()
  1028. {
  1029.   Pint wsid, err;
  1030.   Pdefer_mode defmode;
  1031.   Pmod_mode modmode;
  1032.   Pdisp_surf_empty dspsurf;
  1033.   Pvisual_st state;
  1034.  
  1035.   wsid = readinteger("workstation identifier ? ");
  1036.   pinq_disp_upd_st(wsid, &err, &defmode, &modmode, &dspsurf, &state);
  1037.   if (writeinform)
  1038.   {
  1039.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1040.     if (err == 0)
  1041.     {
  1042.       phinprintf(PTKEINFORM, "current display update state:\n");
  1043.       phinprintf(PTKEINFORM, "deferral mode = ");
  1044.       writephigsenum(PTKEINFORM, PTKEDEFMODE, defmode);
  1045.       phinprintf(PTKEINFORM, "modification mode = ");
  1046.       writephigsenum(PTKEINFORM, PTKEMOD, modmode);
  1047.       phinprintf(PTKEINFORM, "display surface empty = ");
  1048.       writephigsenum(PTKEINFORM, PTKEDSPSURF, dspsurf);
  1049.       phinprintf(PTKEINFORM, "visual representation = ");
  1050.       writephigsenum(PTKEINFORM, PTKEVISUALREP, state);
  1051.     }
  1052.     else
  1053.       phigserror(PTKEINFORM, err);
  1054.   }
  1055. }  /* do_pinqdisplayupdatest */
  1056.  
  1057. /*--------------------------------------------------------------------------*/
  1058.  
  1059. static void do_pinqdynstruct()
  1060. {
  1061.   Pint wstype;
  1062.   Pint err;
  1063.   Pdyns_structs dynamics;
  1064.  
  1065.   readwstype(&wstype);
  1066.   pinq_dyns_structs(wstype, &err, &dynamics);
  1067.   if (writeinform)
  1068.   {
  1069.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1070.     if (err == 0)
  1071.     {
  1072.       phinprintf(PTKEINFORM, "structure dynamics:\n");
  1073.       phinprintf(PTKEINFORM, "content = ");
  1074.       writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.content);
  1075.       phinprintf(PTKEINFORM, "post = ");
  1076.       writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.post);
  1077.       phinprintf(PTKEINFORM, "unpost = ");
  1078.       writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.unpost);
  1079.       phinprintf(PTKEINFORM, "delete = ");
  1080.       writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.del);
  1081.       phinprintf(PTKEINFORM, "reference = ");
  1082.       writephigsenum(PTKEINFORM, PTKEMODTYPE, 
  1083.                      dynamics.ref);
  1084.     }
  1085.     else
  1086.       phigserror(PTKEINFORM, err);
  1087.   }
  1088. }  /* do_pinqdynstruct */
  1089.  
  1090. /*--------------------------------------------------------------------------*/
  1091.  
  1092. static void do_pinqdynwsattr()
  1093. {
  1094.   Pint wstype;
  1095.   Pint err;
  1096.   Pdyns_ws_attrs attr;
  1097.  
  1098.   readwstype(&wstype);
  1099.   pinq_dyns_ws_attrs(wstype, &err, &attr);
  1100.   if (writeinform)
  1101.   {
  1102.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1103.     if (err == 0)
  1104.     {
  1105.       phinprintf(PTKEINFORM, "attribute dynamics:\n");
  1106.       phinprintf(PTKEINFORM, "line = ");
  1107.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.line_bundle);
  1108.       phinprintf(PTKEINFORM, "marker = ");
  1109.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.marker_bundle);
  1110.       phinprintf(PTKEINFORM, "text = ");
  1111.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.text_bundle);
  1112.       phinprintf(PTKEINFORM, "interior = ");
  1113.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.int_bundle);
  1114.       phinprintf(PTKEINFORM, "edge = ");
  1115.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.edge_bundle);
  1116.       phinprintf(PTKEINFORM, "pattern = ");
  1117.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.pat_rep);
  1118.       phinprintf(PTKEINFORM, "colour = ");
  1119.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.colr_rep);
  1120.       phinprintf(PTKEINFORM, "view = ");
  1121.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.view_rep);
  1122.       phinprintf(PTKEINFORM, "workstation transformation = ");
  1123.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.ws_tran);
  1124.       phinprintf(PTKEINFORM, "highlighting = ");
  1125.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.highl_filter);
  1126.       phinprintf(PTKEINFORM, "invisibility = ");
  1127.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.invis_filter);
  1128.       phinprintf(PTKEINFORM, "hlhsr = ");
  1129.       writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.hlhsr_mode);
  1130.     }
  1131.     else
  1132.       phigserror(PTKEINFORM, err);
  1133.   }
  1134. }  /* do_pinqdynwsattr */
  1135.  
  1136. /*--------------------------------------------------------------------------*/
  1137.  
  1138. static void do_pinqedgefacil()
  1139. {
  1140.   Pint wstype;
  1141.   Pint start, err, totlength, i;
  1142.   Pedge_facs facil;
  1143.  
  1144.   readwstype(&wstype);
  1145.   start = readposinteger("starting position ? ");
  1146.   pinq_edge_facs(wstype, 0, start, &err, &facil, &totlength);
  1147.   facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1148.   facil.types.num_ints = totlength;
  1149.   pinq_edge_facs(wstype, totlength, start, &err, &facil, &totlength);
  1150.   if (writeinform)
  1151.   {
  1152.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1153.     if (err == 0)
  1154.     {
  1155.       phinprintf(PTKEINFORM, "edge facilities:\n");
  1156.       phinprintf(PTKEINFORM, "edgetypes:\n");
  1157.       phinprintf(PTKEINFORM, "number = ");
  1158.       writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
  1159.       phinprintf(PTKEINFORM, "number of available widths = ");
  1160.       writeinteger(PTKEINFORM, facil.num_widths);
  1161.       phinprintf(PTKEINFORM, "nominal width = ");
  1162.       writereal(PTKEINFORM, facil.nom_width);
  1163.       phinprintf(PTKEINFORM, "minimum width = ");
  1164.       writereal(PTKEINFORM, facil.min_width);
  1165.       phinprintf(PTKEINFORM, "maximum width = ");
  1166.       writereal(PTKEINFORM, facil.max_width);
  1167.       phinprintf(PTKEINFORM, "number of predefined edge bundles = ");
  1168.       writeinteger(PTKEINFORM, facil.num_pred_inds);
  1169.     }
  1170.     else
  1171.       phigserror(PTKEINFORM, err);
  1172.   }
  1173.   free(facil.types.ints);
  1174. }  /* do_pinqedgefacil */
  1175.  
  1176. /*--------------------------------------------------------------------------*/
  1177.  
  1178. static void do_pinqedgerep()
  1179. {
  1180.   Pint wsid, err, totlength, index;
  1181.   Pinq_type type;
  1182.   Pedge_bundle rep;
  1183.  
  1184.   wsid = readinteger("workstation identifier ? ");
  1185.   index = readposinteger("edge index ? ");
  1186.   type = readphigsenum(PTKEINQTYPE, "inquire type ?");
  1187.   pinq_edge_rep(wsid, index, type, &err, &rep);
  1188.   if (writeinform)
  1189.   {
  1190.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1191.     if (err == 0)
  1192.     {
  1193.       phinprintf(PTKEINFORM, "edge representation:\n");
  1194.       writeedgebundl(PTKEINFORM, &rep);
  1195.     }
  1196.     else
  1197.       phigserror(PTKEINFORM, err);
  1198.   }
  1199. }  /* do_pinqedgerep */
  1200.  
  1201. /*--------------------------------------------------------------------------*/
  1202.  
  1203. static void do_pinqeditmode()
  1204. {
  1205.   Pint err;
  1206.   Pedit_mode mode;
  1207.  
  1208.   pinq_edit_mode(&err, &mode);
  1209.   if (writeinform)
  1210.   {
  1211.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1212.     if (err == 0)
  1213.     {
  1214.       phinprintf(PTKEINFORM, "edit mode = ");
  1215.       writephigsenum(PTKEINFORM, PTKEEDITMODE, mode);
  1216.     }
  1217.     else
  1218.       phigserror(PTKEINFORM, err);
  1219.   }
  1220. }  /* do_pinqeditmode */
  1221.  
  1222. /*--------------------------------------------------------------------------*/
  1223.  
  1224. static void do_pinqelemcontent()
  1225. {
  1226.   Pint stid, elptr, err;  
  1227.   Pstore store;
  1228.   ptkselcontent elcont;
  1229.  
  1230.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  1231.   elptr = readinteger("element pointer ? ");
  1232.   pcreate_store(&err, &store);
  1233.   ptk_inqelemtypesizecontent(stid, elptr, store, &err, &elcont);
  1234.   if (writeinform)
  1235.   {
  1236.     phinprintf(PTKEINFORM, "--- %s ---\n", 
  1237.             phigsnamelist[activefunction]);
  1238.     if (err == 0)
  1239.     {
  1240.       phinprintf(PTKEINFORM, "element content:\n");
  1241.       writeelemcontent(PTKEINFORM, &elcont);
  1242.     }
  1243.     else
  1244.       phigserror(PTKEINFORM, err);
  1245.   }
  1246.   ptk_delstore(store);
  1247. }  /* do_pinqelemcontent */
  1248.  
  1249. /*--------------------------------------------------------------------------*/
  1250.  
  1251. static void do_pinqelemptr()
  1252. {
  1253.   Pint elptr, err;
  1254.  
  1255.   pinq_elem_ptr(&err, &elptr);
  1256.   if (writeinform)
  1257.   {
  1258.     phinprintf(PTKEINFORM, "--- %s ---\n", 
  1259.             phigsnamelist[activefunction]);
  1260.     if (err == 0)
  1261.     {
  1262.       phinprintf(PTKEINFORM, "current element pointer = ");
  1263.       writeinteger(PTKEINFORM, elptr);
  1264.     }
  1265.     else
  1266.       phigserror(PTKEINFORM, err);
  1267.   }
  1268. }  /* do_pinqelemptr */
  1269.  
  1270. /*--------------------------------------------------------------------------*/
  1271.  
  1272. static void do_pinqelemtypesize()
  1273. {
  1274.   Pint stid, elptr, err;
  1275.   Pelem_type eltype;
  1276.   size_t size;
  1277.  
  1278.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  1279.   elptr = readinteger("element pointer ? ");
  1280.   pinq_elem_type_size(stid, elptr, &err, &eltype, &size);
  1281.   if (writeinform)
  1282.   {
  1283.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1284.     if (err == 0)
  1285.     {
  1286.       phinprintf(PTKEINFORM, "element type = ");
  1287.       writephigsenum(PTKEINFORM, PTKEELTYPE, eltype);
  1288.       phinprintf(PTKEINFORM, "element size = ");
  1289.       writeinteger(PTKEINFORM, size);
  1290.     }
  1291.     else
  1292.       phigserror(PTKEINFORM, err);
  1293.   }
  1294. }  /* do_pinqelemtypesize */
  1295.  
  1296. /*--------------------------------------------------------------------------*/
  1297.  
  1298. static void do_pinqerrorhandmode()
  1299. {
  1300.   Pint err;
  1301.   Perr_mode mode;
  1302.  
  1303.   pinq_err_hand_mode(&err, &mode);
  1304.   if (writeinform)
  1305.   {
  1306.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1307.     if (err == 0)
  1308.     {
  1309.       phinprintf(PTKEINFORM, "error mode = ");
  1310.       writephigsenum(PTKEINFORM, PTKEERRORMODE, mode);
  1311.     }
  1312.     else
  1313.       phigserror(PTKEINFORM, err);
  1314.   }
  1315. }  /* do_pinqerrorhandmode */
  1316.  
  1317. /*--------------------------------------------------------------------------*/
  1318.  
  1319. static void do_pinqgdp()
  1320. {
  1321.   Pint wstype;
  1322.   Pint gdp, err, numatts, i;
  1323.   Pattrs atts[5];
  1324.  
  1325.   readwstype(&wstype);
  1326.   gdp = readinteger("GDP identifier ? ");
  1327.   pinq_gdp(wstype, gdp, &err, &numatts, atts);
  1328.   if (writeinform)
  1329.   {
  1330.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1331.     if (err == 0)
  1332.     {
  1333.       phinprintf(PTKEINFORM, "GDP attributes:\n");
  1334.       for (i = 0; i < numatts; i++)
  1335.       {
  1336.         phinprintf(PTKEINFORM, "attribute set = ");
  1337.         writephigsenum(PTKEINFORM, PTKEATTRS, atts[i]);
  1338.       }
  1339.     }
  1340.     else
  1341.       phigserror(PTKEINFORM, err);
  1342.   }
  1343. }  /* do_pinqgdp */
  1344.  
  1345. /*--------------------------------------------------------------------------*/
  1346.  
  1347. static void do_pinqgdp3()
  1348. {
  1349.   Pint wstype;
  1350.   Pint gdp, err, numatts, i;
  1351.   Pattrs atts[5];
  1352.  
  1353.   readwstype(&wstype);
  1354.   gdp = readinteger("GDP identifier ? ");
  1355.   pinq_gdp3(wstype, gdp, &err, &numatts, atts);
  1356.   if (writeinform)
  1357.   {
  1358.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1359.     if (err == 0)
  1360.     {
  1361.       phinprintf(PTKEINFORM, "GDP attributes:\n");
  1362.       for (i = 0; i < numatts; i++)
  1363.       {
  1364.         phinprintf(PTKEINFORM, "attribute set = ");
  1365.         writephigsenum(PTKEINFORM, PTKEATTRS, atts[i]);
  1366.       }
  1367.     }
  1368.     else
  1369.       phigserror(PTKEINFORM, err);
  1370.   }
  1371. }  /* do_pinqgdp3 */
  1372.  
  1373. /*--------------------------------------------------------------------------*/
  1374.  
  1375. static void do_pinqgsefacil()
  1376. {
  1377.   Pint start, err, totlength, i;
  1378.   Pgse_id_dep_list gse;
  1379.  
  1380.   start = readposinteger("starting position ? ");
  1381.   pinq_gse_facs(0, start, &err, &gse, &totlength);
  1382.   gse.id_facs = (Pgse_id_dep *)calloc(totlength, sizeof(Pgse_id_dep));
  1383.   gse.num_id_facs = totlength;
  1384.   pinq_gse_facs(totlength, start, &err, &gse, &totlength);
  1385.   if (writeinform)
  1386.   {
  1387.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1388.     if (err == 0)
  1389.     {
  1390.       phinprintf(PTKEINFORM, "GSE facilities:\n");
  1391.       for (i = 0; i < gse.num_id_facs; i++)
  1392.       {
  1393.         phinprintf(PTKEINFORM, "GSE identifier [%d] = %d\n", i, 
  1394.                 gse.id_facs[i].id);
  1395.         phinprintf(PTKEINFORM, "workstation dependency indicator = ");
  1396.         writephigsenum(PTKEINFORM, PTKEWSDEP, 
  1397.                        gse.id_facs[i].ind);
  1398.       }
  1399.     }
  1400.     else
  1401.       phigserror(PTKEINFORM, err);
  1402.   }
  1403.   free(gse.id_facs);
  1404. }  /* do_pinqgsefacil */
  1405.  
  1406. /*--------------------------------------------------------------------------*/
  1407.  
  1408. static void do_pinqhilightfilter()
  1409. {
  1410.   Pint wsid, err, i;
  1411.   Pfilter *highfilt;
  1412.   Pstore store;
  1413.  
  1414.   wsid = readinteger("workstation identifier ? ");
  1415.   pcreate_store(&err, &store);
  1416.   pinq_highl_filter(wsid, store, &err, &highfilt);
  1417.   if (writeinform)
  1418.   {
  1419.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1420.     if (err == 0)
  1421.     {
  1422.       phinprintf(PTKEINFORM, "inclusion set:\n");
  1423.       phinprintf(PTKEINFORM, "number = ");
  1424.       writeintlst(PTKEINFORM, &highfilt->incl_set, PTKENAME);
  1425.       phinprintf(PTKEINFORM, "exclusion set:\n");
  1426.       phinprintf(PTKEINFORM, "number = ");
  1427.       writeintlst(PTKEINFORM, &highfilt->excl_set, PTKENAME);
  1428.     }
  1429.     else
  1430.       phigserror(PTKEINFORM, err);
  1431.   }
  1432.   ptk_delstore(store);
  1433. }  /* do_pinqhilightfilter */
  1434.  
  1435. /*--------------------------------------------------------------------------*/
  1436.  
  1437. static void do_pinqhlhsrfacil()
  1438. {
  1439.   Pint wstype;
  1440.   Pint wsid, idstart, modestart, err, totidlen, totmodelen, i;
  1441.   Pint_list ids, modes;
  1442.  
  1443.   readwstype(&wstype);
  1444.   idstart = readposinteger("starting position in id list ? ");
  1445.   modestart = readposinteger("starting position in mode list ? ");
  1446.   pinq_hlhsr_mode_facs(wstype, 0, modestart, &err, &modes, &totmodelen);
  1447.   pinq_hlhsr_id_facs(wstype, 0, idstart, &err, &ids, &totidlen);
  1448.   ids.ints = (Pint *)calloc(totidlen, sizeof(Pint));
  1449.   modes.ints = (Pint *)calloc(totmodelen, sizeof(Pint));
  1450.   ids.num_ints = totidlen;
  1451.   modes.num_ints = totmodelen;
  1452.   pinq_hlhsr_mode_facs(wstype, totmodelen, modestart, &err, 
  1453.                        &modes, &totmodelen);
  1454.   pinq_hlhsr_id_facs(wstype, totidlen, idstart, &err, &ids, &totidlen);
  1455.   if (writeinform)
  1456.   {
  1457.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1458.     if (err == 0)
  1459.     {
  1460.       phinprintf(PTKEINFORM, "HLHSR identifiers:\n");
  1461.       phinprintf(PTKEINFORM, "number = ");
  1462.       writeintlst(PTKEINFORM, &ids, PTKENOTABLE);
  1463.       phinprintf(PTKEINFORM, "HLHSR modes:\n");
  1464.       phinprintf(PTKEINFORM, "number = ");
  1465.       writeintlst(PTKEINFORM, &modes, PTKENOTABLE);
  1466.     }
  1467.     else
  1468.       phigserror(PTKEINFORM, err);
  1469.   }
  1470.   free(ids.ints);
  1471.   free(modes.ints);
  1472. }  /* do_pinqhlhsrfacil */
  1473.  
  1474. /*--------------------------------------------------------------------------*/
  1475.  
  1476. static void do_pinqhlhsrmode()
  1477. {
  1478.   Pint wsid, err, curmode, reqmode;
  1479.   Pupd_st state;
  1480.  
  1481.   wsid = readinteger("workstation identifier ? ");
  1482.   pinq_hlhsr_mode(wsid, &err, &state, &curmode, &reqmode);
  1483.   if (writeinform)
  1484.   {
  1485.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1486.     if (err == 0)
  1487.     {
  1488.       phinprintf(PTKEINFORM, "HLHSR update state = ");
  1489.       writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
  1490.       phinprintf(PTKEINFORM, "current HLHSR mode = ");
  1491.       writeinteger(PTKEINFORM, curmode);
  1492.       phinprintf(PTKEINFORM, "requested HLHSR mode = ");
  1493.       writeinteger(PTKEINFORM, reqmode);
  1494.     }
  1495.     else
  1496.       phigserror(PTKEINFORM, err);
  1497.   }
  1498. }  /* do_pinqhlhsrmode */
  1499.  
  1500. /*--------------------------------------------------------------------------*/
  1501.  
  1502. static void do_pinqinputoverflow()
  1503. {
  1504.   Pint err, wsid, dev;
  1505.   Pin_class class;
  1506.  
  1507.   pinq_in_overf(&err, &wsid, &class, &dev);
  1508.   if (writeinform)
  1509.   {
  1510.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1511.     if (err == 0)
  1512.     {
  1513.       phinprintf(PTKEINFORM, "workstation identifier = ");
  1514.       writeinteger(PTKEINFORM, wsid);
  1515.       phinprintf(PTKEINFORM, "input class = ");
  1516.       writephigsenum(PTKEINFORM, PTKEICLASS, class);
  1517.       phinprintf(PTKEINFORM, "input device number = ");
  1518.       writeinteger(PTKEINFORM, dev);
  1519.     }
  1520.     else
  1521.       phigserror(PTKEINFORM, err);
  1522.   }
  1523. }  /* do_pinqinputoverflow */
  1524.  
  1525. /*--------------------------------------------------------------------------*/
  1526.  
  1527. static void do_pinqintfacil()
  1528. {
  1529.   Pint wstype;
  1530.   Pint hatstart, err, tothatlen, i;
  1531.   Pint_facs facil;
  1532.  
  1533.   readwstype(&wstype);
  1534.   hatstart = readposinteger("starting position in hatch list ? ");
  1535.   pinq_int_facs(wstype, 0, hatstart, &err, &facil, &tothatlen);
  1536.   facil.hatch_styles.ints = (Pint *)calloc(tothatlen, sizeof(Pint));
  1537.   facil.hatch_styles.num_ints = tothatlen;
  1538.   pinq_int_facs(wstype, tothatlen, hatstart, &err, &facil, &tothatlen);
  1539.   if (writeinform)
  1540.   {
  1541.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1542.     if (err == 0)
  1543.     {
  1544.       phinprintf(PTKEINFORM, "interior styles:\n");
  1545.       writeenumlist(PTKEINFORM, PTKEINTERSTYLE, facil.num_int_styles, 
  1546.                     facil.int_styles);
  1547.       phinprintf(PTKEINFORM, "hatch styles:\n");
  1548.       phinprintf(PTKEINFORM, "number = ");
  1549.       writeintlst(PTKEINFORM, &facil.hatch_styles, PTKENOTABLE);
  1550.       phinprintf(PTKEINFORM, "number of predefined interior bundles = ");
  1551.       writeinteger(PTKEINFORM, facil.num_pred_inds);
  1552.     }
  1553.     else
  1554.       phigserror(PTKEINFORM, err);
  1555.   }
  1556.   free(facil.hatch_styles.ints);
  1557. }  /* do_pinqintfacil */
  1558.  
  1559. /*--------------------------------------------------------------------------*/
  1560.  
  1561. static void do_pinqintrep()
  1562. {
  1563.   Pint wsid, index, err;
  1564.   Pinq_type type;
  1565.   Pint_bundle rep;
  1566.  
  1567.   wsid = readinteger("workstation identifier ? ");
  1568.   index = readposinteger("interior index ? ");
  1569.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  1570.   pinq_int_rep(wsid, index, type, &err, &rep);
  1571.   if (writeinform)
  1572.   {
  1573.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1574.     if (err == 0)
  1575.     {
  1576.       phinprintf(PTKEINFORM, "interior representation:\n");
  1577.       writeinterbundl(PTKEINFORM, &rep);
  1578.     }
  1579.     else
  1580.       phigserror(PTKEINFORM, err);
  1581.   }
  1582. }  /* do_pinqintrep */
  1583.  
  1584. /*--------------------------------------------------------------------------*/
  1585.  
  1586. static void do_pinqinvisfilter()
  1587. {
  1588.   Pint wsid, err, i;
  1589.   Pfilter *highfilt;
  1590.   Pstore store;
  1591.  
  1592.   wsid = readinteger("workstation identifier ? ");
  1593.   pcreate_store(&err, &store);
  1594.   pinq_invis_filter(wsid, store, &err, &highfilt);
  1595.   if (writeinform)
  1596.   {
  1597.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1598.     if (err == 0)
  1599.     {
  1600.       phinprintf(PTKEINFORM, "inclusion set:\n");
  1601.       phinprintf(PTKEINFORM, "number = ");
  1602.       writeintlst(PTKEINFORM, &highfilt->incl_set, PTKENAME);
  1603.       phinprintf(PTKEINFORM, "exclusion set:\n");
  1604.       phinprintf(PTKEINFORM, "number = ");
  1605.       writeintlst(PTKEINFORM, &highfilt->excl_set, PTKENAME);
  1606.     }
  1607.     else
  1608.       phigserror(PTKEINFORM, err);
  1609.   }
  1610.   ptk_delstore(store);
  1611. }  /* do_pinqinvisfilter */
  1612.  
  1613. /*--------------------------------------------------------------------------*/
  1614.  
  1615. static void do_pinqavailgdp()
  1616. {
  1617.   Pint wstype;
  1618.   Pint start, err, totlen, i;
  1619.   Pint_list gdps;
  1620.  
  1621.   readwstype(&wstype);
  1622.   start = readposinteger("starting position ? ");
  1623.   pinq_list_avail_gdp(wstype, 0, start, &err, &gdps, &totlen);
  1624.   gdps.num_ints = totlen;
  1625.   gdps.ints = (Pint *)calloc(totlen, sizeof(Pint));
  1626.   pinq_list_avail_gdp(wstype, totlen, start, &err, &gdps, &totlen);
  1627.   if (writeinform)
  1628.   {
  1629.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1630.     if (err == 0)
  1631.     {
  1632.       phinprintf(PTKEINFORM, "GDP identifiers:\n");
  1633.       phinprintf(PTKEINFORM, "number = ");
  1634.       writeintlst(PTKEINFORM, &gdps, PTKENOTABLE);
  1635.     }
  1636.     else
  1637.       phigserror(PTKEINFORM, err);
  1638.   }
  1639.   free(gdps.ints);
  1640. }  /* do_pinqavailgdp */
  1641.  
  1642. /*--------------------------------------------------------------------------*/
  1643.  
  1644. static void do_pinqavailgdp3()
  1645. {
  1646.   Pint wstype;
  1647.   Pint start, err, totlen, i;
  1648.   Pint_list gdps;
  1649.  
  1650.   readwstype(&wstype);
  1651.   start = readposinteger("starting position ? ");
  1652.   pinq_list_avail_gdp3(wstype, 0, start, &err, &gdps, &totlen);
  1653.   gdps.num_ints = totlen;
  1654.   gdps.ints = (Pint *)calloc(totlen, sizeof(Pint));
  1655.   pinq_list_avail_gdp3(wstype, totlen, start, &err, &gdps, &totlen);
  1656.   if (writeinform)
  1657.   {
  1658.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1659.     if (err == 0)
  1660.     {
  1661.       phinprintf(PTKEINFORM, "GDP identifiers:\n");
  1662.       phinprintf(PTKEINFORM, "number = ");
  1663.       writeintlst(PTKEINFORM, &gdps, PTKENOTABLE);
  1664.     }
  1665.     else
  1666.       phigserror(PTKEINFORM, err);
  1667.   }
  1668.   free(gdps.ints);
  1669. }  /* do_pinqavailgdp3 */
  1670.  
  1671. /*--------------------------------------------------------------------------*/
  1672.  
  1673. static void do_pinqgse()
  1674. {
  1675.   Pint wstype;
  1676.   Pint start, err, totlen, i;
  1677.   Pint_list gses;
  1678.  
  1679.   readwstype(&wstype);
  1680.   start = readposinteger("starting position ? ");
  1681.   pinq_list_avail_gse(wstype, 0, start, &err, &gses, &totlen);
  1682.   gses.ints = (Pint *)calloc(totlen, sizeof(Pint));
  1683.   pinq_list_avail_gse(wstype, totlen, start, &err, &gses, &totlen);
  1684.   if (writeinform)
  1685.   {
  1686.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1687.     if (err == 0)
  1688.     {
  1689.       phinprintf(PTKEINFORM, "GSE identifiers:\n");
  1690.       phinprintf(PTKEINFORM, "number = ");
  1691.       writeintlst(PTKEINFORM, &gses, PTKENOTABLE);
  1692.     }
  1693.     else
  1694.       phigserror(PTKEINFORM, err);
  1695.   }
  1696.   free(gses.ints);
  1697. }  /* do_pinqgse */
  1698.  
  1699. /*--------------------------------------------------------------------------*/
  1700.  
  1701. static void do_pinqwstypes()
  1702. {
  1703.   Pint err, totsize, start, i;
  1704.   Pint_list wslist;
  1705.  
  1706.   start = readposinteger("starting position ? ");
  1707.   pinq_list_avail_ws_types(0, start, &err, &wslist, &totsize);
  1708.   wslist.ints = (Pint *)calloc(totsize, sizeof(Pint));
  1709.   pinq_list_avail_ws_types(totsize, start, &err, &wslist, &totsize);
  1710.   if (writeinform)
  1711.   {
  1712.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1713.     if (err == 0)
  1714.     {
  1715.       phinprintf(PTKEINFORM, "available workstation types:\n");
  1716.       phinprintf(PTKEINFORM, "number = ");
  1717.       writeintlst(PTKEINFORM, &wslist, PTKENOTABLE);
  1718.     }
  1719.     else
  1720.       phigserror(PTKEINFORM, err);
  1721.   }
  1722.   free(wslist.ints);
  1723. }  /* do_pinqwstypes */
  1724.  
  1725. /*--------------------------------------------------------------------------*/
  1726.  
  1727. static void do_pinqcolourind()
  1728. {
  1729.   Pint wsid, start, err, totlength, i;
  1730.   Pint_list inds;
  1731.  
  1732.   wsid = readinteger("workstation identifier ? ");
  1733.   start = readposinteger("starting position ? ");
  1734.   pinq_list_colr_inds(wsid, 0, start, &err, &inds, &totlength);
  1735.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1736.   inds.num_ints = totlength;
  1737.   pinq_list_colr_inds(wsid, totlength, start, &err, &inds, &totlength);
  1738.   if (writeinform)
  1739.   {
  1740.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1741.     if (err == 0)
  1742.     {
  1743.       phinprintf(PTKEINFORM, "colours:\n");
  1744.       phinprintf(PTKEINFORM, "number = ");
  1745.       writeintlst(PTKEINFORM, &inds, PTKECOLOURIND);
  1746.     }
  1747.     else
  1748.       phigserror(PTKEINFORM, err);
  1749.   }
  1750.   free(inds.ints);
  1751. }  /* do_pinqcolourind */
  1752.  
  1753. /*--------------------------------------------------------------------------*/
  1754.  
  1755. static void do_pinqedgeind()
  1756. {
  1757.   Pint wsid, start, err, totlength, i;
  1758.   Pint_list edgeinds;
  1759.  
  1760.   wsid = readinteger("workstation identifier ? ");
  1761.   start = readposinteger("starting position ? ");
  1762.   pinq_list_edge_inds(wsid, 0, start, &err, &edgeinds, &totlength);
  1763.   edgeinds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1764.   edgeinds.num_ints = totlength;
  1765.   pinq_list_edge_inds(wsid, totlength, start, &err, &edgeinds, &totlength);
  1766.   if (writeinform)
  1767.   {
  1768.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1769.     if (err == 0)
  1770.     {
  1771.       phinprintf(PTKEINFORM, "edges:\n");
  1772.       phinprintf(PTKEINFORM, "number = ");
  1773.       writeintlst(PTKEINFORM, &edgeinds, PTKENOTABLE);
  1774.     }
  1775.     else
  1776.       phigserror(PTKEINFORM, err);
  1777.   }
  1778.   free(edgeinds.ints);
  1779. }  /* do_pinqedgeind */
  1780.  
  1781. /*--------------------------------------------------------------------------*/
  1782.  
  1783. static void do_pinqintind()
  1784. {
  1785.   Pint wsid, start, err, totlength, i;
  1786.   Pint_list inds;
  1787.  
  1788.   wsid = readinteger("workstation identifier ? ");
  1789.   start = readposinteger("starting position ? ");
  1790.   pinq_list_int_inds(wsid, 0, start, &err, &inds, &totlength);
  1791.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1792.   inds.num_ints = totlength;
  1793.   pinq_list_int_inds(wsid, totlength, start, &err, &inds, &totlength);
  1794.   if (writeinform)
  1795.   {
  1796.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1797.     if (err == 0)
  1798.     {
  1799.       phinprintf(PTKEINFORM, "interiors:\n");
  1800.       phinprintf(PTKEINFORM, "number = ");
  1801.       writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
  1802.     }
  1803.     else
  1804.       phigserror(PTKEINFORM, err);
  1805.   }
  1806.   free(inds.ints);
  1807. }  /* do_pinqintind */
  1808.  
  1809. /*--------------------------------------------------------------------------*/
  1810.  
  1811. static void do_pinqpatind()
  1812. {
  1813.   Pint wsid, start, err, totlength, i;
  1814.   Pint_list inds;
  1815.  
  1816. #ifdef HP
  1817.   phintererror(1, (char *)NULL, INFORM);
  1818. #else
  1819.   wsid = readinteger("workstation identifier ? ");
  1820.   start = readposinteger("starting position ? ");
  1821.   pinq_list_pat_inds(wsid, 0, start, &err, &inds, &totlength);
  1822.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1823.   inds.num_ints = totlength;
  1824.   pinq_list_pat_inds(wsid, totlength, start, &err, &inds, &totlength);
  1825.   if (writeinform)
  1826.   {
  1827.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1828.     if (err == 0)
  1829.     {
  1830.       phinprintf(PTKEINFORM, "patterns:\n");
  1831.       phinprintf(PTKEINFORM, "number = ");
  1832.       writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
  1833.     }
  1834.     else
  1835.       phigserror(PTKEINFORM, err);
  1836.   }
  1837.   free(inds.ints);
  1838. #endif
  1839. }  /* do_pinqpatind */
  1840.  
  1841. /*--------------------------------------------------------------------------*/
  1842.  
  1843. static void do_pinqlineind()
  1844. {
  1845.   Pint wsid, start, err, totlength, i;
  1846.   Pint_list inds;
  1847.  
  1848.   wsid = readinteger("workstation identifier ? ");
  1849.   start = readposinteger("starting position ? ");
  1850.   pinq_list_line_inds(wsid, 0, start, &err, &inds, &totlength);
  1851.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1852.   inds.num_ints = totlength;
  1853.   pinq_list_line_inds(wsid, totlength, start, &err, &inds, &totlength);
  1854.   if (writeinform)
  1855.   {
  1856.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1857.     if (err == 0)
  1858.     {
  1859.       phinprintf(PTKEINFORM, "lines:\n");
  1860.       phinprintf(PTKEINFORM, "number = ");
  1861.       writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
  1862.     }
  1863.     else
  1864.       phigserror(PTKEINFORM, err);
  1865.   }
  1866.   free(inds.ints);
  1867. }  /* do_pinqlineind */
  1868.  
  1869. /*--------------------------------------------------------------------------*/
  1870.  
  1871. static void do_pinqmarkerind()
  1872. {
  1873.   Pint wsid, start, err, totlength, i;
  1874.   Pint_list inds;
  1875.  
  1876.   wsid = readinteger("workstation identifier ? ");
  1877.   start = readposinteger("starting position ? ");
  1878.   pinq_list_marker_inds(wsid, 0, start, &err, &inds, &totlength);
  1879.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1880.   inds.num_ints = totlength;
  1881.   pinq_list_marker_inds(wsid, totlength, start, &err, &inds, &totlength);
  1882.   if (writeinform)
  1883.   {
  1884.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1885.     if (err == 0)
  1886.     {
  1887.       phinprintf(PTKEINFORM, "markers:\n");
  1888.       phinprintf(PTKEINFORM, "number = ");
  1889.       writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
  1890.     }
  1891.     else
  1892.       phigserror(PTKEINFORM, err);
  1893.   }
  1894.   free(inds.ints);
  1895. }  /* do_pinqmarkerind */
  1896.  
  1897. /*--------------------------------------------------------------------------*/
  1898.  
  1899. static void do_pinqtextind()
  1900. {
  1901.   Pint wsid, start, err, totlength, i;
  1902.   Pint_list inds;
  1903.  
  1904.   wsid = readinteger("workstation identifier ? ");
  1905.   start = readposinteger("starting position ? ");
  1906.   pinq_list_text_inds(wsid, 0, start, &err, &inds, &totlength);
  1907.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1908.   inds.num_ints = totlength;
  1909.   pinq_list_text_inds(wsid, totlength, start, &err, &inds, &totlength);
  1910.   if (writeinform)
  1911.   {
  1912.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1913.     if (err == 0)
  1914.     {
  1915.       phinprintf(PTKEINFORM, "text:\n");
  1916.       phinprintf(PTKEINFORM, "number = ");
  1917.       writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
  1918.     }
  1919.     else
  1920.       phigserror(PTKEINFORM, err);
  1921.   }
  1922.   free(inds.ints);
  1923. }  /* do_pinqtextind */
  1924.  
  1925. /*--------------------------------------------------------------------------*/
  1926.  
  1927. static void do_pinqviewind()
  1928. {
  1929.   Pint wsid, start, err, totlength, i;
  1930.   Pint_list inds;
  1931.  
  1932.   wsid = readinteger("workstation identifier ? ");
  1933.   start = readposinteger("starting position ? ");
  1934.   pinq_list_view_inds(wsid, 0, start, &err, &inds, &totlength);
  1935.   inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1936.   inds.num_ints = totlength;
  1937.   pinq_list_view_inds(wsid, totlength, start, &err, &inds, &totlength);
  1938.   if (writeinform)
  1939.   {
  1940.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1941.     if (err == 0)
  1942.     {
  1943.       phinprintf(PTKEINFORM, "views:\n");
  1944.       phinprintf(PTKEINFORM, "number = ");
  1945.       writeintlst(PTKEINFORM, &inds, PTKEVIEWIND);
  1946.     }
  1947.     else
  1948.       phigserror(PTKEINFORM, err);
  1949.   }
  1950.   free(inds.ints);
  1951. }  /* do_pinqviewind */
  1952.  
  1953. /*--------------------------------------------------------------------------*/
  1954.  
  1955. static void do_pinqlinefacil()
  1956. {
  1957.   Pint wstype;
  1958.   Pint start, err, totlength, i;
  1959.   Pline_facs facil;
  1960.  
  1961.   readwstype(&wstype);
  1962.   start = readposinteger("starting position ? ");
  1963.   pinq_line_facs(wstype, 0, start, &err, &facil, &totlength);
  1964.   facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
  1965.   facil.types.num_ints = totlength;
  1966.   pinq_line_facs(wstype, totlength, start, &err, &facil, &totlength);
  1967.   if (writeinform)
  1968.   {
  1969.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  1970.     if (err == 0)
  1971.     {
  1972.       phinprintf(PTKEINFORM, "linetypes:\n");
  1973.       phinprintf(PTKEINFORM, "number = ");
  1974.       writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
  1975.       phinprintf(PTKEINFORM, "number of available widths = ");
  1976.       writeinteger(PTKEINFORM, facil.num_widths);
  1977.       phinprintf(PTKEINFORM, "nominal width = ");
  1978.       writereal(PTKEINFORM, facil.nom_width);
  1979.       phinprintf(PTKEINFORM, "minimum width = ");
  1980.       writereal(PTKEINFORM, facil.min_width);
  1981.       phinprintf(PTKEINFORM, "maximum width = ");
  1982.       writereal(PTKEINFORM, facil.max_width);
  1983.       phinprintf(PTKEINFORM, "number of predefined polyline bundles = ");
  1984.       writeinteger(PTKEINFORM, facil.num_pred_inds);
  1985.     }
  1986.     else
  1987.       phigserror(PTKEINFORM, err);
  1988.   }
  1989.   free(facil.types.ints);
  1990. }  /* do_pinqlinefacil */
  1991.  
  1992. /*--------------------------------------------------------------------------*/
  1993.  
  1994. static void do_pinqlinerep()
  1995. {
  1996.   Pint wsid, index, err;
  1997.   Pinq_type type;
  1998.   Pline_bundle rep;
  1999.  
  2000.   wsid = readinteger("workstation identifier ? ");
  2001.   index = readposinteger("line index ? ");
  2002.   type = readphigsenum(PTKEINQTYPE, "type of value ? ");
  2003.   pinq_line_rep(wsid, index, type, &err, &rep);
  2004.   if (writeinform)
  2005.   {
  2006.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2007.     if (err == 0)
  2008.     {
  2009.       phinprintf(PTKEINFORM, "line representation:\n");
  2010.       writelnbundl(PTKEINFORM, &rep);
  2011.     }
  2012.     else
  2013.       phigserror(PTKEINFORM, err);
  2014.   }
  2015. }  /* do_pinqlinerep */
  2016.  
  2017. /*--------------------------------------------------------------------------*/
  2018.  
  2019. static void do_pinqlocst()
  2020. {
  2021.   Pint ws, dev, err, initview, pet;
  2022.   Pstore store;
  2023.   Pop_mode mode;
  2024.   Pecho_switch esw;
  2025.   Ppoint initpos;
  2026.   Pinq_type type;
  2027.   Plimit echo;
  2028.   Ploc_data *locdata;
  2029.  
  2030.   ws = readinteger("workstation identifier ? ");
  2031.   dev = readinteger("locator device number ? ");
  2032.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2033.   pcreate_store(&err, &store);
  2034.   pinq_loc_st(ws, dev, type, store, &err, &mode, &esw, &initview,
  2035.               &initpos, &pet, &echo, &locdata);
  2036.   if (writeinform)
  2037.   {
  2038.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2039.     if (err == 0)
  2040.     {
  2041.       phinprintf(PTKEINFORM, "current state of locator device %d:\n", dev);
  2042.       phinprintf(PTKEINFORM, "operating mode = ");
  2043.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2044.       phinprintf(PTKEINFORM, "echo switch = ");
  2045.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2046.       phinprintf(PTKEINFORM, "initial view index = ");
  2047.       writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
  2048.       /* Plocst contains a  Ploc3 field - probably should be a Ploc
  2049.       ** field. DEC PHIGS error.
  2050.       */
  2051.       phinprintf(PTKEINFORM, "initial position:\n");
  2052.       writepoint3(PTKEINFORM, &initpos);
  2053.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2054.       writeinteger(PTKEINFORM, pet);
  2055.       phinprintf(PTKEINFORM, "echo limits:\n");
  2056.       writelimit(PTKEINFORM, &echo);
  2057.       writelocrec(PTKEINFORM, dev, pet, locdata);
  2058.     }
  2059.     else
  2060.       phigserror(PTKEINFORM, err);
  2061.   }
  2062.   ptk_delstore(store);
  2063. }  /* do_pinqlocst */
  2064.  
  2065. /*--------------------------------------------------------------------------*/
  2066.  
  2067. static void do_pinqlocst3()
  2068. {
  2069.   Pint ws, dev, err, initview, pet;
  2070.   Pstore store;
  2071.   Pop_mode mode;
  2072.   Pecho_switch esw;
  2073.   Ppoint3 initpos;
  2074.   Pinq_type type;
  2075.   Plimit3 echo;
  2076.   Ploc_data3 *locdata;
  2077.  
  2078.   ws = readinteger("workstation identifier ? ");
  2079.   dev = readinteger("locator device number ? ");
  2080.   type = readphigsenum(PTKEINQTYPE, "inquire type ? "); 
  2081.   pcreate_store(&err, &store);
  2082.   pinq_loc_st3(ws, dev, type, store, &err, &mode, &esw, &initview, 
  2083.                &initpos, &pet, &echo, &locdata);
  2084.   if (writeinform)
  2085.   {
  2086.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2087.     if (err == 0)
  2088.     {
  2089.       phinprintf(PTKEINFORM, "current state of locator 3 device %d:\n", dev);
  2090.       phinprintf(PTKEINFORM, "operating mode = ");
  2091.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2092.       phinprintf(PTKEINFORM, "echo switch = ");
  2093.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2094.       phinprintf(PTKEINFORM, "initial view index = ");
  2095.       writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
  2096.       phinprintf(PTKEINFORM, "initial position:\n");
  2097.       writepoint3(PTKEINFORM, &initpos);
  2098.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2099.       writeinteger(PTKEINFORM, pet);
  2100.       phinprintf(PTKEINFORM, "echo limits:\n");
  2101.       writelimit3(PTKEINFORM, &echo);
  2102.       writelocrec3(PTKEINFORM, dev, pet, locdata);
  2103.     }
  2104.     else
  2105.       phigserror(PTKEINFORM, err);
  2106.   }
  2107.   ptk_delstore(store);
  2108. }  /* do_pinqlocst3 */
  2109.  
  2110. /*--------------------------------------------------------------------------*/
  2111.  
  2112. static void do_pinqmarkerfacil()
  2113. {
  2114.   Pint wstype, start, err, totlength, i;
  2115.   Pmarker_facs facil;
  2116.  
  2117.   readwstype(&wstype);
  2118.   start = readposinteger("starting position ? ");
  2119.   pinq_marker_facs(wstype, 0, start, &err, &facil, &totlength);
  2120.   facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
  2121.   pinq_marker_facs(wstype, totlength, start, &err, &facil, &totlength);
  2122.   if (writeinform)
  2123.   {
  2124.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2125.     if (err == 0)
  2126.     {
  2127.       phinprintf(PTKEINFORM, "marker facilities:\n");
  2128.       phinprintf(PTKEINFORM, "marker types:\n");
  2129.       phinprintf(PTKEINFORM, "number = ");
  2130.       writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
  2131.       phinprintf(PTKEINFORM, "number of available sizes = ");
  2132.       writeinteger(PTKEINFORM, facil.num_sizes);
  2133.       phinprintf(PTKEINFORM, "nominal size = ");
  2134.       writereal(PTKEINFORM, facil.nom_size);
  2135.       phinprintf(PTKEINFORM, "minimum size = ");
  2136.       writereal(PTKEINFORM, facil.min_size);
  2137.       phinprintf(PTKEINFORM, "maximum size = ");
  2138.       writereal(PTKEINFORM, facil.max_size);
  2139.       phinprintf(PTKEINFORM, "number of predefined polymarker bundles = ");
  2140.       writeinteger(PTKEINFORM, facil.num_pred_inds);
  2141.     }
  2142.     else
  2143.       phigserror(PTKEINFORM, err);
  2144.   }
  2145.   free(facil.types.ints);
  2146. }  /* do_pinqmarkerfacil */
  2147.  
  2148. /*--------------------------------------------------------------------------*/
  2149.  
  2150. static void do_pinqmarkerrep()
  2151. {
  2152.   Pint wsid, index, err;
  2153.   Pinq_type type;
  2154.   Pmarker_bundle rep;
  2155.  
  2156.   wsid = readinteger("workstation identifier ? ");
  2157.   index = readposinteger("marker index ? ");
  2158.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2159.   pinq_marker_rep(wsid, index, type, &err, &rep);
  2160.   if (writeinform)
  2161.   {
  2162.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2163.     if (err == 0)
  2164.     {
  2165.       phinprintf(PTKEINFORM, "marker representation:\n");
  2166.       writemkbundl(PTKEINFORM, &rep);
  2167.     }
  2168.     else
  2169.       phigserror(PTKEINFORM, err);
  2170.   }
  2171. }  /* do_pinqmarkerrep */
  2172.  
  2173. /*--------------------------------------------------------------------------*/
  2174.  
  2175. static void do_pinqmodelclipfacil()
  2176. {
  2177.   Pint start, err, totlength, num;
  2178.   Pint_list ops;
  2179.  
  2180.   start = readposinteger("starting position ? ");
  2181.   pinq_model_clip_facs(0, start, &err, &num, &ops, &totlength);
  2182.   ops.ints = (Pint *)calloc(totlength, sizeof(Pint));
  2183.   ops.num_ints = totlength;
  2184.   pinq_model_clip_facs(totlength, start, &err, &num, &ops, &totlength);
  2185.   if (writeinform)
  2186.   {
  2187.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2188.     if (err == 0)
  2189.     {
  2190.       phinprintf(PTKEINFORM,
  2191.               "number of distinct planes in modelling clipping volume = ");
  2192.       writeinteger(PTKEINFORM, num); 
  2193.       phinprintf(PTKEINFORM, "modelling clip operators:\n");
  2194.       phinprintf(PTKEINFORM, "number = ");
  2195.       writeintlst(PTKEINFORM, &ops, PTKENOTABLE);
  2196.     }
  2197.     else
  2198.       phigserror(PTKEINFORM, err);
  2199.   }
  2200.   free(ops.ints);
  2201. }  /* do_pinqmodelclipfacil */
  2202.  
  2203. /*--------------------------------------------------------------------------*/
  2204.  
  2205. static void do_pinqmoreevents()
  2206. {
  2207.   Pint err;
  2208.   Pmore_simult_events events;
  2209.  
  2210.   pinq_more_simult_events(&err, &events);
  2211.   if (writeinform)
  2212.   {
  2213.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2214.     if (err == 0)
  2215.     {
  2216.       phinprintf(PTKEINFORM, "simultaneous events = ");
  2217.       writephigsenum(PTKEINFORM, PTKESIMULTEV, events);
  2218.     }
  2219.     else
  2220.       phigserror(PTKEINFORM, err);
  2221.   }
  2222. }  /* do_pinqmoreevents */
  2223.  
  2224. /*--------------------------------------------------------------------------*/
  2225.  
  2226. static void do_pinqnuminput()
  2227. {
  2228.   Pint wstype;
  2229.   Pint err;
  2230.   Pnum_in numbers;
  2231.  
  2232.   readwstype(&wstype);
  2233.   pinq_num_avail_in(wstype, &err, &numbers);
  2234.   if (writeinform)
  2235.   {
  2236.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2237.     if (err == 0)
  2238.     {
  2239.       phinprintf(PTKEINFORM, "locator = ");
  2240.       writeinteger(PTKEINFORM, numbers.loc);
  2241.       phinprintf(PTKEINFORM, "stroke = ");
  2242.       writeinteger(PTKEINFORM, numbers.stroke);
  2243.       phinprintf(PTKEINFORM, "valuator = ");
  2244.       writeinteger(PTKEINFORM, numbers.val);
  2245.       phinprintf(PTKEINFORM, "choice = ");
  2246.       writeinteger(PTKEINFORM, numbers.choice);
  2247.       phinprintf(PTKEINFORM, "pick = ");
  2248.       writeinteger(PTKEINFORM, numbers.pick);
  2249.       phinprintf(PTKEINFORM, "string = ");
  2250.       writeinteger(PTKEINFORM, numbers.string);
  2251.     }
  2252.     else
  2253.       phigserror(PTKEINFORM, err);
  2254.   }
  2255. }  /* do_pinqnuminput */
  2256.  
  2257. /*--------------------------------------------------------------------------*/
  2258.  
  2259. static void do_pinqnumdisplaypri()
  2260. {
  2261.   Pint wstype;
  2262.   Pint err, numpri;
  2263.  
  2264.   readwstype(&wstype);
  2265.   pinq_num_disp_pris(wstype, &err, &numpri);
  2266.   if (writeinform)
  2267.   {
  2268.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2269.     if (err == 0)
  2270.     {
  2271.       phinprintf(PTKEINFORM, "number of display priorities = ");
  2272.       writeinteger(PTKEINFORM, numpri);
  2273.     }
  2274.     else
  2275.       phigserror(PTKEINFORM, err);
  2276.   }
  2277. }  /* do_pinqnumdisplaypri */
  2278.  
  2279. /*--------------------------------------------------------------------------*/
  2280.  
  2281. static void do_pinqopenstruct()
  2282. {
  2283.   Pint name, err;
  2284.   Popen_struct_status status;
  2285.  
  2286.   pinq_open_struct(&err, &status, &name);
  2287.   if (writeinform)
  2288.   {
  2289.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2290.     if (err == 0)
  2291.     {
  2292.       phinprintf(PTKEINFORM, "open structure status = ");
  2293.       writephigsenum(PTKEINFORM, PTKEOPENSTRUCTSTATUS, status);
  2294.       if (status == PSTRUCT_OPEN)
  2295.       {
  2296.         phinprintf(PTKEINFORM, "open structure = ");
  2297.         writeintvalue(PTKEINFORM, name, PTKESTRUCTID);
  2298.       }
  2299.     }
  2300.     else
  2301.       phigserror(PTKEINFORM, err);
  2302.   }
  2303. }  /* pinq_open_struct */
  2304.  
  2305. /*--------------------------------------------------------------------------*/
  2306.  
  2307. static void do_pinqpatfacil()
  2308. {
  2309.   Pint wstype;
  2310.   Pint err, predefined;
  2311.  
  2312.   readwstype(&wstype);
  2313.   pinq_pat_facs(wstype, &err, &predefined);
  2314.   if (writeinform)
  2315.   {
  2316.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2317.     if (err == 0)
  2318.     {
  2319.       phinprintf(PTKEINFORM,
  2320.               "number of predefined pattern indices = ");
  2321.       writeinteger(PTKEINFORM, predefined);
  2322.     }
  2323.     else
  2324.       phigserror(PTKEINFORM, err);
  2325.   }
  2326. }  /* do_pinqpatfacil */
  2327.  
  2328. /*--------------------------------------------------------------------------*/
  2329.  
  2330. static void do_pinqpatrep()
  2331. {
  2332.   Pint wsid, index, err, numcols, i;
  2333.   Pinq_type type;
  2334.   Ppat_rep *rep;
  2335.   Pstore store;
  2336.  
  2337. #ifdef HP
  2338.   phintererror(1, (char *)NULL, INFORM);
  2339. #else
  2340.   wsid = readinteger("workstation identifier ? ");
  2341.   index = readposinteger("pattern index ? ");
  2342.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2343.   pcreate_store(&err, &store);
  2344.   pinq_pat_rep(wsid, index, type, store, &err, &rep);
  2345.   if (writeinform)
  2346.   {
  2347.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2348.     if (err == 0)
  2349.     {
  2350.       phinprintf(PTKEINFORM, "pattern representation:\n");
  2351.       phinprintf(PTKEINFORM, "dimensions, x = %d, y = %d\n",
  2352.               rep->dims.size_x, rep->dims.size_y);
  2353.       numcols = rep->dims.size_x * rep->dims.size_y;
  2354.       phinprintf(PTKEINFORM, "colour indices:\n");
  2355.       writeintarray(PTKEINFORM, numcols, rep->colr_array, PTKECOLOURIND);
  2356.     }
  2357.     else
  2358.       phigserror(PTKEINFORM, err);
  2359.   }
  2360.   ptk_delstore(store);
  2361. #endif
  2362. }  /* do_pinqpatrep */
  2363.  
  2364. /*--------------------------------------------------------------------------*/
  2365.  
  2366. static void do_pinqphigsfacil()
  2367. {
  2368.   Pint start, err, openws, openar, numnames, normfilt, invfilt, totlength, i;
  2369.   Pint_list charsets;
  2370.  
  2371.   start = readposinteger("starting position ? ");
  2372.   pinq_phigs_facs(0, start, &err, &openws, &openar, &numnames, &charsets, 
  2373.                   &totlength, &normfilt, &invfilt);
  2374.   charsets.ints = (Pint *)calloc(totlength, sizeof(Pint));
  2375.   charsets.num_ints = totlength;
  2376.   pinq_phigs_facs(totlength, start, &err, &openws, &openar, &numnames, 
  2377.                  &charsets, &totlength, &normfilt, &invfilt);
  2378.   if (writeinform)
  2379.   {
  2380.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2381.     if (err == 0)
  2382.     {
  2383.       phinprintf(PTKEINFORM, "PHIGS facilities:\n");
  2384.       phinprintf(PTKEINFORM, 
  2385.               "maximum number of simultaneously open workstations = ");
  2386.       writeinteger(PTKEINFORM, openws);
  2387.       phinprintf(PTKEINFORM, 
  2388.               "maximum number of simultaneously open archive files = ");
  2389.       writeinteger(PTKEINFORM, openar);
  2390.       phinprintf(PTKEINFORM, 
  2391.               "number of available names for namesets = ");
  2392.       writeinteger(PTKEINFORM, numnames);
  2393.       phinprintf(PTKEINFORM, "character sets:\n");
  2394.       phinprintf(PTKEINFORM, "number = ");
  2395.       writeintlst(PTKEINFORM, &charsets, PTKENOTABLE);
  2396.       phinprintf(PTKEINFORM, 
  2397.               "maximum length of normal filter list for ISS = ");
  2398.       writeinteger(PTKEINFORM, normfilt);
  2399.       phinprintf(PTKEINFORM, 
  2400.               "maximum length of inverted filter list for ISS = ");
  2401.       writeinteger(PTKEINFORM, invfilt);
  2402.     }
  2403.     else
  2404.       phigserror(PTKEINFORM, err);
  2405.   }
  2406.   free(charsets.ints);
  2407. }  /* do_pinqphigsfacil */
  2408.  
  2409. /*--------------------------------------------------------------------------*/
  2410.  
  2411. static void do_pinqpickst()
  2412. {
  2413.   Pint ws, dev, err, i, pet;
  2414.   Pstore store;
  2415.   Pinq_type type;
  2416.   Pop_mode mode;
  2417.   Pecho_switch esw;
  2418.   Pfilter *pickfilt;
  2419.   Pin_status status;
  2420.   Ppick_path *initpick;
  2421.   Plimit echo;
  2422.   Ppick_data **pickdata;
  2423.   Ppath_order order;
  2424.  
  2425.   ws = readinteger("workstation identifier ? ");
  2426.   dev = readinteger("pick device number ? ");
  2427.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2428.   pcreate_store(&err, &store);
  2429.   pinq_pick_st(ws, dev, type, store, &err, &mode, &esw, &pickfilt,
  2430.                &status, &initpick, &pet, &echo, &pickdata, &order);
  2431.   if (writeinform)
  2432.   {
  2433.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2434.     if (err == 0)
  2435.     {
  2436.       phinprintf(PTKEINFORM, "pick device state:\n");
  2437.       phinprintf(PTKEINFORM, "operating mode = ");
  2438.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2439.       phinprintf(PTKEINFORM, "echo switch = ");
  2440.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2441.       phinprintf(PTKEINFORM, "pick inclusion filter:\n");
  2442.       phinprintf(PTKEINFORM, "number = ");
  2443.       writeintlst(PTKEINFORM, &pickfilt->incl_set, PTKENAME);
  2444.       phinprintf(PTKEINFORM, "pick exclusion filter:\n");
  2445.       phinprintf(PTKEINFORM, "number = ");
  2446.       writeintlst(PTKEINFORM, &pickfilt->excl_set, PTKENAME);
  2447.       phinprintf(PTKEINFORM, "pick status = ");
  2448.       writephigsenum(PTKEINFORM, PTKEISTATUS, status);
  2449.       phinprintf(PTKEINFORM, "pick path:\n");
  2450.       writepickpath(PTKEINFORM, initpick);
  2451.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2452.       writeinteger(PTKEINFORM, pet);
  2453.       phinprintf(PTKEINFORM, "echo limits:\n");
  2454.       writelimit(PTKEINFORM, &echo);
  2455.       writepickrec(PTKEINFORM, dev, pet, pickdata);
  2456.       phinprintf(PTKEINFORM, "path order = ");
  2457.       writephigsenum(PTKEINFORM, PTKEPATHORDER, order);
  2458.     }
  2459.     else
  2460.       phigserror(PTKEINFORM, err);
  2461.   }
  2462.   ptk_delstore(store);
  2463. }  /* do_pinqpickst */
  2464.  
  2465. /*--------------------------------------------------------------------------*/
  2466.  
  2467. static void do_pinqpickst3()
  2468. {
  2469.   Pint ws, dev, err, pet, i;
  2470.   Pstore store;
  2471.   Pinq_type type;
  2472.   Pop_mode mode;
  2473.   Pecho_switch esw;
  2474.   Pfilter *pickfilt;
  2475.   Pin_status status;
  2476.   Ppick_path *initpick;
  2477.   Plimit3 echo;
  2478.   Ppick_data3 **pickdata;
  2479.   Ppath_order order;
  2480.  
  2481.   ws = readinteger("workstation identifier ? ");
  2482.   dev = readinteger("pick device number ? ");
  2483.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2484.   pcreate_store(&err, &store);
  2485.   pinq_pick_st3(ws, dev, type, store, &err, &mode, &esw, &pickfilt,
  2486.                 &status, &initpick, &pet, &echo, &pickdata, &order);
  2487.   if (writeinform)
  2488.   {
  2489.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2490.     if (err == 0)
  2491.     {
  2492.       phinprintf(PTKEINFORM, "operating mode = ");
  2493.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2494.       phinprintf(PTKEINFORM, "echo switch = ");
  2495.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2496.       phinprintf(PTKEINFORM, "pick inclusion filter:\n");
  2497.       phinprintf(PTKEINFORM, "number = ");
  2498.       writeintlst(PTKEINFORM, &pickfilt->incl_set, PTKENAME);
  2499.       phinprintf(PTKEINFORM, "pick exclusion filter:\n");
  2500.       phinprintf(PTKEINFORM, "number = ");
  2501.       writeintlst(PTKEINFORM, &pickfilt->excl_set, PTKENAME);
  2502.       phinprintf(PTKEINFORM, "pick status = ");
  2503.       writephigsenum(PTKEINFORM, PTKEISTATUS, status);
  2504.       phinprintf(PTKEINFORM, "pick path:\n");
  2505.       writepickpath(PTKEINFORM, initpick);
  2506.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2507.       writeinteger(PTKEINFORM, pet);
  2508.       phinprintf(PTKEINFORM, "echo limits:\n");
  2509.       writelimit3(PTKEINFORM, &echo);
  2510.       writepickrec3(PTKEINFORM, dev, pet, pickdata);
  2511.       phinprintf(PTKEINFORM, "path order = ");
  2512.       writephigsenum(PTKEINFORM, PTKEPATHORDER, order);
  2513.     }
  2514.     else
  2515.       phigserror(PTKEINFORM, err);
  2516.   }
  2517.   ptk_delstore(store);
  2518. }  /* do_pinqpickst3 */
  2519.  
  2520. /*--------------------------------------------------------------------------*/
  2521.  
  2522. static void do_pinqpostedstruct()
  2523. {
  2524.   Pint ws, start, err, totlength, i;
  2525.   Pposted_struct_list list;
  2526.  
  2527.   ws = readinteger("workstation identifier ? ");
  2528.   start = readposinteger("starting position ? ");
  2529.   pinq_posted_structs(ws, 0, start, &err, &list, &totlength);
  2530.   list.postings = (Pposted_struct *)calloc(totlength, sizeof(Pposted_struct));
  2531.   list.num_postings = totlength;
  2532.   pinq_posted_structs(ws, totlength, start, &err, &list, &totlength);
  2533.   if (writeinform)
  2534.   {
  2535.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2536.     if (err == 0)
  2537.     {
  2538.       phinprintf(PTKEINFORM, "number of posted structures = ");
  2539.       writeinteger(PTKEINFORM, list.num_postings);
  2540.       for (i = 0; i < list.num_postings; i++)
  2541.       {
  2542.         phinprintf(PTKEINFORM, "structure identifier = ");
  2543.         writeintvalue(PTKEINFORM, list.postings[i].id, PTKESTRUCTID);
  2544.         phinprintf(PTKEINFORM, "priority = %f\n", list.postings[i].disp_pri);
  2545.       }
  2546.     }
  2547.     else
  2548.       phigserror(PTKEINFORM, err);
  2549.   }
  2550.   free(list.postings);
  2551. }  /* do_pinqpostedstruct */
  2552.  
  2553. /*--------------------------------------------------------------------------*/
  2554.  
  2555. static void do_pinqpredcolourrep()
  2556. {
  2557.   Pint wstype;
  2558.   Pint index, err;
  2559.   Pcolr_rep bundle;
  2560.  
  2561.   readwstype(&wstype);
  2562.   index = readposintvalue("predefined index ? ", PTKECOLOURIND);
  2563.   pinq_pred_colr_rep(wstype, index, &err, &bundle);
  2564.   if (writeinform)
  2565.   {
  2566.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2567.     if (err == 0)
  2568.     {
  2569.       phinprintf(PTKEINFORM, 
  2570.               "predefined colour representation:\n");
  2571.       writecobundl(PTKEINFORM, &bundle);
  2572.     }
  2573.     else
  2574.       phigserror(PTKEINFORM, err);
  2575.   }
  2576. }  /* do_pinqpredcolourrep */
  2577.  
  2578. /*--------------------------------------------------------------------------*/
  2579.  
  2580. static void do_pinqprededgerep()
  2581. {
  2582.   Pint wstype;
  2583.   Pint index, err;
  2584.   Pedge_bundle bundle;
  2585.  
  2586.   readwstype(&wstype);
  2587.   index = readposinteger("predefined index ? ");
  2588.   pinq_pred_edge_rep(wstype, index, &err, &bundle);
  2589.   if (writeinform)
  2590.   {
  2591.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2592.     if (err == 0)
  2593.     {
  2594.       phinprintf(PTKEINFORM, "predefined edge representation:\n");
  2595.       writeedgebundl(PTKEINFORM, &bundle);
  2596.     }
  2597.     else
  2598.       phigserror(PTKEINFORM, err);
  2599.   }
  2600. }  /* do_pinqprededgerep */
  2601.  
  2602. /*--------------------------------------------------------------------------*/
  2603.  
  2604. static void do_pinqpredintrep()
  2605. {
  2606.   Pint wstype;
  2607.   Pint index, err;
  2608.   Pint_bundle bundle;
  2609.  
  2610.   readwstype(&wstype);
  2611.   index = readposinteger("predefined index ? ");
  2612.   pinq_pred_int_rep(wstype, index, &err, &bundle);
  2613.   if (writeinform)
  2614.   {
  2615.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2616.     if (err == 0)
  2617.     {
  2618.       phinprintf(PTKEINFORM, 
  2619.               "predefined interior representation:\n");
  2620.       writeinterbundl(PTKEINFORM, &bundle);
  2621.     }
  2622.     else
  2623.       phigserror(PTKEINFORM, err);
  2624.   }
  2625. }  /* do_pinqpredintrep */
  2626.  
  2627. /*--------------------------------------------------------------------------*/
  2628.  
  2629. static void do_pinqpredpatrep()
  2630. {
  2631.   Pint wstype, index, err, numcols, i;
  2632.   Ppat_rep *rep;
  2633.   Pstore store;
  2634.  
  2635. #ifdef HP
  2636.   phintererror(1, (char *)NULL, INFORM);
  2637. #else
  2638.   readwstype(&wstype);
  2639.   index = readposinteger("pattern index ? ");
  2640.   pcreate_store(&err, &store);
  2641.   pinq_pred_pat_rep(wstype, index, store, &err, &rep);
  2642.   if (writeinform)
  2643.   {
  2644.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2645.     if (err == 0)
  2646.     {
  2647.       phinprintf(PTKEINFORM, "predefined pattern representation:\n");
  2648.       phinprintf(PTKEINFORM, "dimensions, x = %d, y = %d\n",
  2649.               rep->dims.size_x, rep->dims.size_y);
  2650.       numcols = rep->dims.size_x * rep->dims.size_y;
  2651.       phinprintf(PTKEINFORM, "colour indices:\n");
  2652.       writeintarray(PTKEINFORM, numcols, rep->colr_array, PTKECOLOURIND);
  2653.     }
  2654.     else
  2655.       phigserror(PTKEINFORM, err);
  2656.   }
  2657.   ptk_delstore(store);
  2658. #endif
  2659. }  /* do_pinqpredpatrep */
  2660.  
  2661. /*--------------------------------------------------------------------------*/
  2662.  
  2663. static void do_pinqpredlinerep()
  2664. {
  2665.   Pint wstype;
  2666.   Pint index, err;
  2667.   Pline_bundle bundle;
  2668.  
  2669.   readwstype(&wstype);
  2670.   index = readposinteger("predefined index ? ");
  2671.   pinq_pred_line_rep(wstype, index, &err, &bundle);
  2672.   if (writeinform)
  2673.   {
  2674.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2675.     if (err == 0)
  2676.     {
  2677.       phinprintf(PTKEINFORM, "predefined line representation:\n");
  2678.       writelnbundl(PTKEINFORM, &bundle);
  2679.     }
  2680.     else
  2681.       phigserror(PTKEINFORM, err);
  2682.   }
  2683. }  /* do_pinqpredlinerep */
  2684.  
  2685. /*--------------------------------------------------------------------------*/
  2686.  
  2687. static void do_pinqpredmarkerrep()
  2688. {
  2689.   Pint wstype;
  2690.   Pint index, err;
  2691.   Pmarker_bundle bundle;
  2692.  
  2693.   readwstype(&wstype);
  2694.   index = readposinteger("predefined index ? ");
  2695.   pinq_pred_marker_rep(wstype, index, &err, &bundle);
  2696.   if (writeinform)
  2697.   {
  2698.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2699.     if (err == 0)
  2700.     {
  2701.       phinprintf(PTKEINFORM, "predefined marker representation:\n");
  2702.       writemkbundl(PTKEINFORM, &bundle);
  2703.     }
  2704.     else
  2705.       phigserror(PTKEINFORM, err);
  2706.   }
  2707. }  /* do_pinqpredmarkerrep */
  2708.  
  2709. /*--------------------------------------------------------------------------*/
  2710.  
  2711. static void do_pinqpredtextrep()
  2712. {
  2713.   Pint wstype;
  2714.   Pint index, err;
  2715.   Ptext_bundle bundle;
  2716.  
  2717.   readwstype(&wstype);
  2718.   index = readposinteger("predefined index ? ");
  2719.   pinq_pred_text_rep(wstype, index, &err, &bundle);
  2720.   if (writeinform)
  2721.   {
  2722.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2723.     if (err == 0)
  2724.     {
  2725.       phinprintf(PTKEINFORM, "predefined text representation:\n");
  2726.       writetxbundl(PTKEINFORM, &bundle);
  2727.     }
  2728.     else
  2729.       phigserror(PTKEINFORM, err);
  2730.   }
  2731. }  /* do_pinqpredtextrep */
  2732.  
  2733. /*--------------------------------------------------------------------------*/
  2734.  
  2735. static void do_pinqpredviewrep()
  2736. {
  2737.   Pint wstype;
  2738.   Pint index, err;
  2739.   Pview_rep3 rep;
  2740.  
  2741.   readwstype(&wstype);
  2742.   index = readposintvalue("predefined index ? ", PTKEVIEWIND);
  2743.   pinq_pred_view_rep(wstype, index, &err, &rep);
  2744.   if (writeinform)
  2745.   {
  2746.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2747.     if (err == 0)
  2748.     {
  2749.       phinprintf(PTKEINFORM, "predefined view representation:\n");
  2750.       phinprintf(PTKEINFORM, "orientation matrix:\n");
  2751.       writematrix3(PTKEINFORM, rep.ori_matrix);
  2752.       phinprintf(PTKEINFORM, "mapping matrix:\n");
  2753.       writematrix3(PTKEINFORM, rep.map_matrix);
  2754.       phinprintf(PTKEINFORM, "clipping limits:\n");
  2755.       writelimit3(PTKEINFORM, &rep.clip_limit);
  2756.       phinprintf(PTKEINFORM, "x-y clipping = ");
  2757.       writephigsenum(PTKEINFORM, PTKECLIP, rep.xy_clip);
  2758.       phinprintf(PTKEINFORM, "back clipping = ");
  2759.       writephigsenum(PTKEINFORM, PTKECLIP, rep.back_clip);
  2760.       phinprintf(PTKEINFORM, "front clipping = ");
  2761.       writephigsenum(PTKEINFORM, PTKECLIP, rep.front_clip);
  2762.     }
  2763.     else
  2764.       phigserror(PTKEINFORM, err);
  2765.   }
  2766. }  /* do_pinqpredviewrep */
  2767.  
  2768. /*--------------------------------------------------------------------------*/
  2769.  
  2770. static void do_pinqsetopenws()
  2771. {
  2772.   Pint start, err, totlength, i;
  2773.   Pint_list wsids;
  2774.  
  2775.   start = readposinteger("starting position ? ");
  2776.   pinq_open_wss(0, start, &err, &wsids, &totlength);
  2777.   wsids.ints = (Pint *)calloc(totlength, sizeof(Pint));
  2778.   wsids.num_ints = totlength;
  2779.   pinq_open_wss(totlength, start, &err, &wsids, &totlength);
  2780.   if (writeinform)
  2781.   {
  2782.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2783.     if (err == 0)
  2784.     {
  2785.       phinprintf(PTKEINFORM, "open workstations:\n");
  2786.       phinprintf(PTKEINFORM, "number = ");
  2787.       writeintlst(PTKEINFORM, &wsids, PTKENOTABLE);
  2788.     }
  2789.     else
  2790.       phigserror(PTKEINFORM, err);
  2791.   }
  2792.   free(wsids.ints);
  2793. }  /* do_pinqsetopenws */
  2794.  
  2795. /*--------------------------------------------------------------------------*/
  2796.  
  2797. static void do_pinqsetwsposted()
  2798. {
  2799.   Pint stid, start, err, totlength, i;
  2800.   Pint_list wsids;
  2801.  
  2802.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  2803.   start = readposinteger("starting position ? ");
  2804.   pinq_wss_posted(stid, 0, start, &err, &wsids, &totlength);
  2805.   wsids.ints = (Pint *)calloc(totlength, sizeof(Pint));
  2806.   wsids.num_ints = totlength;
  2807.   pinq_wss_posted(stid, totlength, start, &err, &wsids, &totlength);
  2808.   if (writeinform)
  2809.   {
  2810.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2811.     if (err == 0)
  2812.     {
  2813.       phinprintf(PTKEINFORM, "workstation identifiers:\n");
  2814.       phinprintf(PTKEINFORM, "number = ");
  2815.       writeintlst(PTKEINFORM, &wsids, PTKENOTABLE);
  2816.     }
  2817.     else
  2818.       phigserror(PTKEINFORM, err);
  2819.   }
  2820.   free(wsids.ints);
  2821. }  /* do_pinqsetwsposted */
  2822.  
  2823. /*--------------------------------------------------------------------------*/
  2824.  
  2825. static void do_pinqstringst()
  2826. {
  2827.   Pint ws, dev, err, pet;
  2828.   Pstore store;
  2829.   Pop_mode mode;
  2830.   Pecho_switch esw;
  2831.   char *initstr;
  2832.   Plimit echo;
  2833.   Pstring_data *strdata;
  2834.  
  2835.   ws = readinteger("workstation identifier ? ");
  2836.   dev = readinteger("string device number ? ");
  2837.   pcreate_store(&err, &store);
  2838.   pinq_string_st(ws, dev, store, &err, &mode, &esw, &initstr, &pet, &echo,
  2839.                  &strdata);
  2840.   if (writeinform)
  2841.   {
  2842.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2843.     if (err == 0)
  2844.     {
  2845.       phinprintf(PTKEINFORM, "current state of string device %d:\n", dev);
  2846.       phinprintf(PTKEINFORM, "operating mode = ");
  2847.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2848.       phinprintf(PTKEINFORM, "echo switch = ");
  2849.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2850.       phinprintf(PTKEINFORM, "initial string = \"%s\"\n", initstr);  
  2851.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2852.       writeinteger(PTKEINFORM, pet);
  2853.       phinprintf(PTKEINFORM, "echo limits:\n");
  2854.       writelimit(PTKEINFORM, &echo);
  2855.       writestringrec(PTKEINFORM, dev, pet, strdata);
  2856.     }
  2857.     else
  2858.       phigserror(PTKEINFORM, err);
  2859.   }
  2860.   ptk_delstore(store);
  2861. }  /* do_pinqstringst */
  2862.  
  2863. /*--------------------------------------------------------------------------*/
  2864.  
  2865. static void do_pinqstringst3()
  2866. {
  2867.   Pint ws, dev, err, pet;
  2868.   Pstore store;
  2869.   Pop_mode mode;
  2870.   Pecho_switch esw;
  2871.   char *initstr;
  2872.   Plimit3 echo;
  2873.   Pstring_data3 *strdata;
  2874.  
  2875.   ws = readinteger("workstation identifier ? ");
  2876.   dev = readinteger("string device number ? ");
  2877.   pcreate_store(&err, &store);
  2878.   pinq_string_st3(ws, dev, store, &err, &mode, &esw, &initstr, &pet,
  2879.                   &echo, &strdata);
  2880.   if (writeinform)
  2881.   {
  2882.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2883.     if (err == 0)
  2884.     {
  2885.       phinprintf(PTKEINFORM, "current state of string 3 device %d:\n", dev);
  2886.       phinprintf(PTKEINFORM, "operating mode = ");
  2887.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2888.       phinprintf(PTKEINFORM, "echo switch = ");
  2889.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2890.       phinprintf(PTKEINFORM, "initial string = \"%s\"\n", initstr);  
  2891.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2892.       writeinteger(PTKEINFORM, pet);
  2893.       phinprintf(PTKEINFORM, "echo limits:\n");
  2894.       writelimit3(PTKEINFORM, &echo);
  2895.       writestringrec3(PTKEINFORM, dev, pet, strdata);
  2896.     }
  2897.     else
  2898.       phigserror(PTKEINFORM, err);
  2899.   }
  2900.   ptk_delstore(store);
  2901. }  /* do_pinqstringst3 */
  2902.  
  2903. /*--------------------------------------------------------------------------*/
  2904.  
  2905. static void do_pinqstrokest()
  2906. {
  2907.   Pint ws, dev, err, initview, i, pet;
  2908.   Pinq_type type;
  2909.   Pop_mode mode;
  2910.   Pecho_switch esw;
  2911.   Ppoint_list *initpts;
  2912.   Plimit echo;
  2913.   Pstroke_data *strokedata;
  2914.   Pstore store;
  2915.  
  2916.   ws = readinteger("workstation identifier ? ");
  2917.   dev = readinteger("stroke device number ? ");
  2918.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2919.   pcreate_store(&err, &store);
  2920.   pinq_stroke_st(ws, dev, type, store, &err, &mode, &esw, &initview,
  2921.                  &initpts, &pet, &echo, &strokedata);
  2922.   if (writeinform)
  2923.   {
  2924.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2925.     if (err == 0)
  2926.     {
  2927.       phinprintf(PTKEINFORM, "current state of stroke device %d:\n", dev);
  2928.       phinprintf(PTKEINFORM, "operating mode = ");
  2929.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2930.       phinprintf(PTKEINFORM, "echo switch = ");
  2931.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2932.       phinprintf(PTKEINFORM, "initial view index = ");
  2933.       writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
  2934.       phinprintf(PTKEINFORM, "points:\n");
  2935.       writepointarray(PTKEINFORM, initpts->num_points, initpts->points);
  2936.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2937.       writeinteger(PTKEINFORM, pet);
  2938.       phinprintf(PTKEINFORM, "echo limits:\n");
  2939.       writelimit(PTKEINFORM, &echo);
  2940.       writestrokerec(PTKEINFORM, dev, pet, strokedata);
  2941.     }
  2942.     else
  2943.       phigserror(PTKEINFORM, err);
  2944.   }
  2945.   ptk_delstore(store);
  2946. }  /* do_pinqstrokest */
  2947.  
  2948. /*--------------------------------------------------------------------------*/
  2949.  
  2950. static void do_pinqstrokest3()
  2951. {
  2952.   Pint ws, dev, err, i, initview, pet;
  2953.   Pinq_type type;
  2954.   Pop_mode mode;
  2955.   Pecho_switch esw;
  2956.   Ppoint_list3 *initpts;
  2957.   Plimit3 echo;
  2958.   Pstroke_data3 *strokedata;
  2959.   Pstore store;
  2960.  
  2961.   ws = readinteger("workstation identifier ? ");
  2962.   dev = readinteger("stroke device number ? ");
  2963.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  2964.   pcreate_store(&err, &store);
  2965.   pinq_stroke_st3(ws, dev, type, store, &err, &mode, &esw, &initview,
  2966.                   &initpts, &pet, &echo, &strokedata);
  2967.   if (writeinform)
  2968.   {
  2969.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  2970.     if (err == 0)
  2971.     {
  2972.       phinprintf(PTKEINFORM, "current state of stroke 3 device %d:\n", dev);
  2973.       phinprintf(PTKEINFORM, "operating mode = ");
  2974.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  2975.       phinprintf(PTKEINFORM, "echo switch = ");
  2976.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  2977.       phinprintf(PTKEINFORM, "initial view index = ");
  2978.       writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
  2979.       phinprintf(PTKEINFORM, "points:\n");
  2980.       writepointarray3(PTKEINFORM, initpts->num_points, initpts->points);
  2981.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  2982.       writeinteger(PTKEINFORM, pet);
  2983.       phinprintf(PTKEINFORM, "echo limits:\n");
  2984.       writelimit3(PTKEINFORM, &echo);
  2985.       writestrokerec3(PTKEINFORM, dev, pet, strokedata);
  2986.     }
  2987.     else
  2988.       phigserror(PTKEINFORM, err);
  2989.   }
  2990.   ptk_delstore(store);
  2991. }  /* do_pinqstrokest3 */
  2992.  
  2993. /*--------------------------------------------------------------------------*/
  2994.  
  2995. static void do_pinqstructids()
  2996. /* crashes in DEC PHIGS if there are no structures */
  2997. {
  2998.   Pint start, err, totlength, i;
  2999.   Pint_list stids;
  3000.  
  3001.   start = readposinteger("starting position ? ");
  3002.   pinq_struct_ids(0, start, &err, &stids, &totlength);
  3003.   stids.ints = (Pint *)calloc(totlength, sizeof(Pint));
  3004.   stids.num_ints = totlength;
  3005.   pinq_struct_ids(totlength, start, &err, &stids, &totlength);
  3006.   if (writeinform)
  3007.   {
  3008.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3009.     if (err == 0)
  3010.     {
  3011.       phinprintf(PTKEINFORM, "structure identifiers:\n");
  3012.       phinprintf(PTKEINFORM, "number = ");
  3013.       writeintlst(PTKEINFORM, &stids, PTKESTRUCTID);
  3014.     }
  3015.     else
  3016.       phigserror(PTKEINFORM, err);
  3017.   }
  3018.   free(stids.ints);
  3019. }  /* do_pinqstructids */
  3020.  
  3021. /*--------------------------------------------------------------------------*/
  3022.  
  3023. static void do_pinqstructst()
  3024. {
  3025.   Pstruct_st state;
  3026.  
  3027.   pinq_struct_st(&state);
  3028.   if (writeinform)
  3029.   {
  3030.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3031.     phinprintf(PTKEINFORM, "structure state value = ");
  3032.     writephigsenum(PTKEINFORM, PTKESTRUCTSTATE, state);
  3033.   }
  3034. }  /* do_pinqstructst */
  3035.  
  3036. /*--------------------------------------------------------------------------*/
  3037.  
  3038. static void do_pinqstructstatus()
  3039. {
  3040.   Pint stid, err;
  3041.   Pstruct_status status;
  3042.  
  3043.   stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
  3044.   pinq_struct_status(stid, &err, &status);
  3045.   if (writeinform)
  3046.   {
  3047.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3048.     if (err == 0)
  3049.     {
  3050.       phinprintf(PTKEINFORM, "structure status = ");
  3051.       writephigsenum(PTKEINFORM, PTKESTRUCTSTATUS, status);
  3052.     }
  3053.     else
  3054.       phigserror(PTKEINFORM, err);
  3055.   }
  3056. }  /* do_pinqstructstatus */
  3057.  
  3058. /*--------------------------------------------------------------------------*/
  3059.  
  3060. static void do_pinqsystemst()
  3061. {
  3062.   Psys_st state;
  3063.  
  3064.   pinq_sys_st(&state);
  3065.   if (writeinform)
  3066.   {
  3067.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3068.     phinprintf(PTKEINFORM, "system state value = ");
  3069.     writephigsenum(PTKEINFORM, PTKESYSTEMSTATE, state);
  3070.   }
  3071. }  /* do_pinqsystemst */
  3072.  
  3073. /*--------------------------------------------------------------------------*/
  3074.  
  3075. static void do_pinqtextextent()
  3076. {
  3077.   Pint wstype;
  3078.   Pint font, err;
  3079.   Pfloat expan, space, height;
  3080.   Ptext_path path;
  3081.   Ptext_align align;
  3082.   char str[255];
  3083.   Prect rect;
  3084.   Ppoint offset;
  3085.  
  3086. #ifdef HP
  3087.   phintererror(1, (char *)NULL, INFORM);
  3088. #else
  3089.   readwstype(&wstype);
  3090.   font = readinteger("text font ? ");
  3091.   expan = readreal("character expansion ? ");
  3092.   space = readreal("character spacing ? ");
  3093.   height = readreal("character height ? ");
  3094.   path = readphigsenum(PTKETXPATH, "text path ? ");
  3095.   align.hor = readphigsenum(PTKETXHOR, "horizontal alignment ? ");
  3096.   align.vert = readphigsenum(PTKETXVER, "vertical alignment ? ");
  3097.   readstring(str, "text string ? ");
  3098.   pinq_text_extent(wstype, font, expan, space, height, path, align.hor,
  3099.                  align.vert, str, &err, &rect, &offset);
  3100.   if (writeinform)
  3101.   {
  3102.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3103.     if (err == 0)
  3104.     {
  3105.       phinprintf(PTKEINFORM, "text extent rectangle:\n");
  3106.       phinprintf(PTKEINFORM, "lower left:\n");
  3107.       writepoint(PTKEINFORM, &rect.p);
  3108.       phinprintf(PTKEINFORM, "upper right:\n");
  3109.       writepoint(PTKEINFORM, &rect.q);
  3110.       phinprintf(PTKEINFORM, "concatenation offset:\n");
  3111.       writepoint(PTKEINFORM, &offset);
  3112.     }
  3113.     else
  3114.       phigserror(PTKEINFORM, err);
  3115.   }
  3116. #endif
  3117. }  /* do_pinqtextextent */
  3118.  
  3119. /*--------------------------------------------------------------------------*/
  3120.  
  3121. static void do_pinqtextfacil()
  3122. {
  3123.   Pint wstype, start, err, totlength, i;
  3124.   Ptext_facs facil;
  3125.  
  3126.   readwstype(&wstype);
  3127.   start = readposinteger("starting position ? ");
  3128.   pinq_text_facs(wstype, 0, start, &err, &facil, &totlength);
  3129.   facil.font_precs = (Ptext_font_prec *)calloc(totlength, 
  3130.                                               sizeof(Ptext_font_prec));
  3131.   pinq_text_facs(wstype, totlength, start, &err, &facil, &totlength);
  3132.   if (writeinform)
  3133.   {
  3134.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3135.     if (err == 0)
  3136.     {
  3137.       phinprintf(PTKEINFORM, "text facilities:\n");
  3138.       for (i = 0; i < facil.num_font_precs; i++)
  3139.       {
  3140.         phinprintf(PTKEINFORM, "font [%d] = %d\n", i, 
  3141.                 facil.font_precs[i].font);
  3142.         phinprintf(PTKEINFORM, "precision = ");
  3143.         writephigsenum(PTKEINFORM, PTKETXPREC, facil.font_precs[i].prec);
  3144.       }
  3145.       phinprintf(PTKEINFORM, "number of character heights = ");
  3146.       writeinteger(PTKEINFORM, facil.num_char_hts);
  3147.       phinprintf(PTKEINFORM, "minimum height = ");
  3148.       writereal(PTKEINFORM, facil.min_char_ht);
  3149.       phinprintf(PTKEINFORM, "maximum height = ");
  3150.       writereal(PTKEINFORM, facil.max_char_ht);
  3151.       phinprintf(PTKEINFORM, "number of character expansions = ");
  3152.       writeinteger(PTKEINFORM, facil.num_char_expans);
  3153.       phinprintf(PTKEINFORM, "minimum expansion = ");
  3154.       writereal(PTKEINFORM, facil.min_char_expan);
  3155.       phinprintf(PTKEINFORM, "maximum expansion = ");
  3156.       writereal(PTKEINFORM, facil.max_char_expan);
  3157.     }
  3158.     else
  3159.       phigserror(PTKEINFORM, err);
  3160.   }
  3161.   free(facil.font_precs);
  3162. }  /* do_pinqtextfacil */
  3163.  
  3164. /*--------------------------------------------------------------------------*/
  3165.  
  3166. static void do_pinqtextrep()
  3167. {
  3168.   Pint wsid, index, err;
  3169.   Pinq_type type;
  3170.   Ptext_bundle rep;
  3171.  
  3172.   wsid = readinteger("workstation identifier ? ");
  3173.   index = readposinteger("text index ? ");
  3174.   type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
  3175.   pinq_text_rep(wsid, index, type, &err, &rep);
  3176.   if (writeinform)
  3177.   {
  3178.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3179.     if (err == 0)
  3180.     {
  3181.       phinprintf(PTKEINFORM, "text representation:\n");
  3182.       writetxbundl(PTKEINFORM, &rep);
  3183.     }
  3184.     else
  3185.       phigserror(PTKEINFORM, err);
  3186.   }
  3187. }  /* do_pinqtextrep */
  3188.  
  3189. /*--------------------------------------------------------------------------*/
  3190.  
  3191. static void do_pinqvalst()
  3192. {
  3193.   Pint ws, dev, err, pet;
  3194.   Pstore store;
  3195.   Pop_mode mode;
  3196.   Pecho_switch esw;
  3197.   Pfloat initval;
  3198.   Plimit echo;
  3199.   Pval_data *valdata;
  3200.  
  3201.   ws = readinteger("workstation identifier ? ");
  3202.   dev = readinteger("valuator device number ? ");
  3203.   pcreate_store(&err, &store);
  3204.   pinq_val_st(ws, dev, store, &err, &mode, &esw, &initval, &pet,
  3205.               &echo, &valdata);
  3206.   if (writeinform)
  3207.   {
  3208.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3209.     if (err == 0)
  3210.     {
  3211.       phinprintf(PTKEINFORM, "current state of valuator device %d:\n", dev);
  3212.       phinprintf(PTKEINFORM, "operating mode = ");
  3213.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  3214.       phinprintf(PTKEINFORM, "echo switch = ");
  3215.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  3216.       phinprintf(PTKEINFORM, "initial value = ");
  3217.       writereal(PTKEINFORM, initval);  
  3218.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  3219.       writeinteger(PTKEINFORM, pet);
  3220.       phinprintf(PTKEINFORM, "echo limits:\n");
  3221.       writelimit(PTKEINFORM, &echo);
  3222.       writevalrec(PTKEINFORM, dev, pet, valdata);
  3223.     }
  3224.     else
  3225.       phigserror(PTKEINFORM, err);
  3226.   }
  3227.   ptk_delstore(store);
  3228. }  /* do_pinqvalst */
  3229.  
  3230. /*--------------------------------------------------------------------------*/
  3231.  
  3232. static void do_pinqvalst3()
  3233. {
  3234.   Pint ws, dev, err, pet;
  3235.   Pstore store;
  3236.   Pop_mode mode;
  3237.   Pecho_switch esw;
  3238.   Pfloat initval;
  3239.   Plimit3 echo;
  3240.   Pval_data3 *valdata;
  3241.  
  3242.   ws = readinteger("workstation identifier ? ");
  3243.   dev = readinteger("valuator device number ? ");
  3244.   pcreate_store(&err, &store);
  3245.   pinq_val_st3(ws, dev, store, &err, &mode, &esw, &initval, &pet,
  3246.                &echo, &valdata);
  3247.   if (writeinform)
  3248.   {
  3249.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3250.     if (err == 0)
  3251.     {
  3252.       phinprintf(PTKEINFORM, "current state of valuator 3 device %d:\n", dev);
  3253.       phinprintf(PTKEINFORM, "operating mode = ");
  3254.       writephigsenum(PTKEINFORM, PTKEIMODE, mode);
  3255.       phinprintf(PTKEINFORM, "echo switch = ");
  3256.       writephigsenum(PTKEINFORM, PTKEESW, esw);
  3257.       phinprintf(PTKEINFORM, "initial value = ");
  3258.       writereal(PTKEINFORM, initval);  
  3259.       phinprintf(PTKEINFORM, "prompt/echo type = ");
  3260.       writeinteger(PTKEINFORM, pet);
  3261.       phinprintf(PTKEINFORM, "echo limits:\n");
  3262.       writelimit3(PTKEINFORM, &echo);
  3263.       writevalrec3(PTKEINFORM, dev, pet, valdata);
  3264.     }
  3265.     else
  3266.       phigserror(PTKEINFORM, err);
  3267.   }
  3268.   ptk_delstore(store);
  3269. }  /* do_pinqvalst3 */
  3270.  
  3271. /*--------------------------------------------------------------------------*/
  3272.  
  3273. static void do_pinqviewfacil()
  3274. {
  3275.   Pint wstype;
  3276.   Pint err, num;
  3277.  
  3278.   readwstype(&wstype);
  3279.   pinq_view_facs(wstype, &err, &num);
  3280.   if (writeinform)
  3281.   {
  3282.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3283.     if (err == 0)
  3284.     {
  3285.       phinprintf(PTKEINFORM, "number of predefined view indices:\n");
  3286.       writeinteger(PTKEINFORM, num);
  3287.     }
  3288.     else
  3289.       phigserror(PTKEINFORM, err);
  3290.   }
  3291. }  /* do_pinqviewfacil */
  3292.  
  3293. /*--------------------------------------------------------------------------*/
  3294.  
  3295. static void do_pinqviewrep()
  3296. {
  3297.   Pint wsid, index, err;
  3298.   Pupd_st state;
  3299.   Pview_rep3 currep, reqrep;
  3300.  
  3301.   wsid = readinteger("workstation identifier ? ");
  3302.   index = readposintvalue("view index ? ", PTKEVIEWIND);
  3303.   pinq_view_rep(wsid, index, &err, &state, &currep, &reqrep);
  3304.   if (writeinform)
  3305.   {
  3306.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3307.     if (err == 0)
  3308.     {
  3309.       phinprintf(PTKEINFORM, "view representation:\n");
  3310.       phinprintf(PTKEINFORM, "transformation update state = ");
  3311.       writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
  3312.       phinprintf(PTKEINFORM, "current orientation matrix:\n");
  3313.       writematrix3(PTKEINFORM, currep.ori_matrix);
  3314.       phinprintf(PTKEINFORM, "current mapping matrix:\n");
  3315.       writematrix3(PTKEINFORM, currep.map_matrix);
  3316.       phinprintf(PTKEINFORM, "current clipping limits:\n");
  3317.       writelimit3(PTKEINFORM, &currep.clip_limit);
  3318.       phinprintf(PTKEINFORM, "current x-y clipping = ");
  3319.       writephigsenum(PTKEINFORM, PTKECLIP, currep.xy_clip);
  3320.       phinprintf(PTKEINFORM, "current back clipping = ");
  3321.       writephigsenum(PTKEINFORM, PTKECLIP, currep.back_clip);
  3322.       phinprintf(PTKEINFORM, "current front clipping = ");
  3323.       writephigsenum(PTKEINFORM, PTKECLIP, currep.front_clip);
  3324.       phinprintf(PTKEINFORM, "requested orientation matrix:\n");
  3325.       writematrix3(PTKEINFORM, reqrep.ori_matrix);
  3326.       phinprintf(PTKEINFORM, "requested mapping matrix:\n");
  3327.       writematrix3(PTKEINFORM, reqrep.map_matrix);
  3328.       phinprintf(PTKEINFORM, "requested clipping limits:\n");
  3329.       writelimit3(PTKEINFORM, &reqrep.clip_limit);
  3330.       phinprintf(PTKEINFORM, "requested x-y clipping = ");
  3331.       writephigsenum(PTKEINFORM, PTKECLIP, reqrep.xy_clip);
  3332.       phinprintf(PTKEINFORM, "requested back clipping = ");
  3333.       writephigsenum(PTKEINFORM, PTKECLIP, reqrep.back_clip);
  3334.       phinprintf(PTKEINFORM, "requested front clipping = ");
  3335.       writephigsenum(PTKEINFORM, PTKECLIP, reqrep.front_clip);
  3336.     }
  3337.     else
  3338.       phigserror(PTKEINFORM, err);
  3339.   }
  3340. }  /* do_pinqviewrep */
  3341.  
  3342. /*--------------------------------------------------------------------------*/
  3343.  
  3344. static void do_pinqwscategory()
  3345. {
  3346.   Pint wstype;
  3347.   Pint err;
  3348.   Pws_cat category;
  3349.  
  3350.   readwstype(&wstype);
  3351.   pinq_ws_cat(wstype, &err, &category);
  3352.   if (writeinform)
  3353.   {
  3354.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3355.     if (err == 0)
  3356.     {
  3357.       phinprintf(PTKEINFORM, "workstation category = ");
  3358.       writephigsenum(PTKEINFORM, PTKEWSCAT, category);
  3359.     }
  3360.     else
  3361.       phigserror(PTKEINFORM, err);
  3362.   }
  3363. }  /* do_pinqwscategory */
  3364.  
  3365. /*--------------------------------------------------------------------------*/
  3366.  
  3367. static void do_pinqwsclass()
  3368. {
  3369.   Pint wstype;
  3370.   Pint err;
  3371.   Pws_class class;
  3372.  
  3373.   readwstype(&wstype);
  3374.   pinq_ws_class(wstype, &err, &class);
  3375.   if (writeinform)
  3376.   {
  3377.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3378.     if (err == 0)
  3379.     {
  3380.       phinprintf(PTKEINFORM, "workstation class = ");
  3381.       writephigsenum(PTKEINFORM, PTKEWSCLASS, class);
  3382.     }
  3383.     else
  3384.       phigserror(PTKEINFORM, err);
  3385.   }
  3386. }  /* do_pinqwsclass */
  3387.  
  3388. /*--------------------------------------------------------------------------*/
  3389.  
  3390. static void do_pinqwsconntype()
  3391. {
  3392.   Pint wsid, err, wstype;
  3393.   Pstore store;
  3394.   void *connid;
  3395.  
  3396.   wsid = readinteger("workstation identifier ? ");
  3397.   pcreate_store(&err, &store);
  3398.   pinq_ws_conn_type(wsid, store, &err, &connid, &wstype);
  3399.   if (writeinform)
  3400.   {
  3401.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3402.     if (err == 0)
  3403.     {
  3404.       phinprintf(PTKEINFORM, "connection identifier = %s\n", 
  3405.               (char *)connid);
  3406.       phinprintf(PTKEINFORM, "workstation type = ");
  3407.       writeinteger(PTKEINFORM, wstype);
  3408.       wst = wstype;
  3409.       ptk_delstore(wststore);
  3410.       wststore = store;
  3411.     }
  3412.     else
  3413.     {
  3414.       phigserror(PTKEINFORM, err);
  3415.       ptk_delstore(store);
  3416.     }
  3417.   }
  3418. }  /* do_pinqwsconntype */
  3419.  
  3420. /*--------------------------------------------------------------------------*/
  3421.  
  3422. static void do_pinqwsst()
  3423. {
  3424.   Pws_st state;
  3425.  
  3426.   pinq_ws_st(&state);
  3427.   if (writeinform)
  3428.   {
  3429.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3430.     phinprintf(PTKEINFORM, "workstation state value = ");
  3431.     writephigsenum(PTKEINFORM, PTKEWSSTATE, state);
  3432.   }
  3433. }  /* do_pinqwsst */
  3434.  
  3435. /*--------------------------------------------------------------------------*/
  3436.  
  3437. static void do_pinqwssttable()
  3438. {
  3439.   Pint wstype;
  3440.   Pint err;
  3441.   Pws_st_tables lengths;
  3442.  
  3443.   readwstype(&wstype);
  3444.   pinq_ws_st_table(wstype, &err, &lengths);
  3445.   if (writeinform)
  3446.   {
  3447.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3448.     if (err == 0)
  3449.     {
  3450.       phinprintf(PTKEINFORM, "lengths of workstation state tables:\n");
  3451.       phinprintf(PTKEINFORM, "line = ");
  3452.       writeinteger(PTKEINFORM, lengths.line_bundles);
  3453.       phinprintf(PTKEINFORM, "marker = ");
  3454.       writeinteger(PTKEINFORM, lengths.mark_bundles);
  3455.       phinprintf(PTKEINFORM, "text = ");
  3456.       writeinteger(PTKEINFORM, lengths.text_bundles);
  3457.       phinprintf(PTKEINFORM, "interior = ");
  3458.       writeinteger(PTKEINFORM, lengths.int_bundles);
  3459.       phinprintf(PTKEINFORM, "edge = ");
  3460.       writeinteger(PTKEINFORM, lengths.edge_bundles);
  3461.       phinprintf(PTKEINFORM, "pattern = ");
  3462.       writeinteger(PTKEINFORM, lengths.pat_reps);
  3463.       phinprintf(PTKEINFORM, "colour = ");
  3464.       writeinteger(PTKEINFORM, lengths.colr_reps);
  3465.       phinprintf(PTKEINFORM, "view = ");
  3466.       writeinteger(PTKEINFORM, lengths.view_reps);
  3467.     }
  3468.     else
  3469.       phigserror(PTKEINFORM, err);
  3470.   }
  3471. }  /* do_pinqwssttable */
  3472.  
  3473. /*--------------------------------------------------------------------------*/
  3474.  
  3475. static void do_pinqwstran()
  3476. {
  3477.   Pint wsid, err;
  3478.   Pupd_st state;
  3479.   Plimit reqwindow, curwindow, reqviewport, curviewport;
  3480.  
  3481.   wsid = readinteger("workstation identifier ? ");
  3482.   pinq_ws_tran(wsid, &err, &state, &reqwindow, &curwindow, &reqviewport,
  3483.                &curviewport);
  3484.   if (writeinform)
  3485.   {
  3486.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3487.     if (err == 0)
  3488.     {
  3489.       phinprintf(PTKEINFORM, "workstation transformation:\n");
  3490.       phinprintf(PTKEINFORM, "update state = ");
  3491.       writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
  3492.       phinprintf(PTKEINFORM, "requested workstation window:\n");
  3493.       writelimit(PTKEINFORM, &reqwindow);
  3494.       phinprintf(PTKEINFORM, "current workstation window:\n");
  3495.       writelimit(PTKEINFORM, &curwindow);
  3496.       phinprintf(PTKEINFORM, "requested workstation viewport:\n");
  3497.       writelimit(PTKEINFORM, &reqviewport);
  3498.       phinprintf(PTKEINFORM, "current workstation viewport:\n");
  3499.       writelimit(PTKEINFORM, &curviewport);
  3500.     }
  3501.     else
  3502.       phigserror(PTKEINFORM, err);
  3503.   }
  3504. }  /* do_pinqwstran */
  3505.  
  3506. /*--------------------------------------------------------------------------*/
  3507.  
  3508. static void do_pinqwstran3()
  3509. {
  3510.   Pint wsid, err;
  3511.   Pupd_st state;
  3512.   Plimit3 reqwindow, curwindow, reqviewport, curviewport;
  3513.  
  3514.   wsid = readinteger("workstation identifier ? ");
  3515.   pinq_ws_tran3(wsid, &err, &state, &reqwindow, &curwindow, &reqviewport,
  3516.                &curviewport);
  3517.   if (writeinform)
  3518.   {
  3519.     phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
  3520.     if (err == 0)
  3521.     {
  3522.       phinprintf(PTKEINFORM, "workstation transformation:\n");
  3523.       phinprintf(PTKEINFORM, "update state = ");
  3524.       writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
  3525.       phinprintf(PTKEINFORM, "requested workstation window:\n");
  3526.       writelimit3(PTKEINFORM, &reqwindow);
  3527.       phinprintf(PTKEINFORM, "current workstation window:\n");
  3528.       writelimit3(PTKEINFORM, &curwindow);
  3529.       phinprintf(PTKEINFORM, "requested workstation viewport:\n");
  3530.       writelimit3(PTKEINFORM, &reqviewport);
  3531.       phinprintf(PTKEINFORM, "current workstation viewport:\n");
  3532.       writelimit3(PTKEINFORM, &curviewport);
  3533.     }
  3534.     else
  3535.       phigserror(PTKEINFORM, err);
  3536.   }
  3537. }  /* do_pinqwstran3 */
  3538.  
  3539. /*--------------------------------------------------------------------------*/
  3540.  
  3541. /* end of pinqfns.c */
  3542.